I just found a useful function in the TweenLite library, which is great for easily sequencing multiple function calls. To call myFunction() in half a second with param1 and param2, do this:
[as]TweenLite.delayedCall(0.5, myFunction, [param1,param2]);[/as]
which is a lot less code than:
[as]var tmr:Timer = new Timer(500, 1);
tmr.addEventListener(TimerEvent.TIMER_COMPLETE,onTimerEvent);
tmr.start();
private function onTimerEvent(event:Event):void{
myFunction(param1,param2);
}[/as]
TweenLite seems to have quickly become something of a Flash standard. It’s a great library that is well maintained and just works.



Latest Tweets