Posted At : Dec 07, 2009 0:39 AM
| Posted By : Ed Tabara
Related Categories:
ColdFusion,
cfHSSF,
cfWatcher,
cfFirewall,
My Projects,
cfSQLMaster,
1ssChat,
1ssBlog
WOOHOO!!!!!!!!!!!!!!!!!!!!!
6000 downloads of my projects. Not too bad. :)
...
| 6585 Views
| 8% / 0% Popularity
Posted At : Oct 30, 2007 17:18 PM
| Posted By : Ed Tabara
Related Categories:
RIA,
ColdFusion,
My Projects,
1ssChat
Here are a couple of snippets i've used when working on my chat application.
1. Add sound to your Flex application:
[Embed(source="media/audibles/chimeup.mp3")]
[Bindable]
public var chimeup:Class;
public var snd_chimeup:Sound = new chimeup() as Sound;
public var sndChannel_chimeup:SoundChannel;
public function playChimeup():void {
sndChannel_chimeup = snd_chimeup.play();
}
2. Making some code be executed at given intervals:
public function ShortTimer():void
{
var minuteTimer:Timer = new Timer(300000, 0);
minuteTimer.addEventListener(TimerEvent.TIMER, onTick);
minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete);
minuteTimer.start();
}
public function onTick(evt:TimerEvent):void
{
}
public function onTimerComplete(evt:TimerEvent):void
{
ShortTimer();
}
Things to be noted here:
300000 - is the number of milliseconds between code executions
onTick - is the function that will be executed at the given interval
onTi...
| 7513 Views
| 9% / 0% Popularity