Another Reason to Love TweenLite
Saturday, May 30th, 2009I 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:
PLAIN TEXT
Actionscript:
TweenLite.delayedCall(0.5, myFunction, [param1,param2]);
which is a lot less code than:
PLAIN TEXT
Actionscript:
var tmr:Timer = new Timer(500, 1);
tmr.addEventListener(TimerEvent.TIMER_COMPLETE,onTimerEvent);
tmr.start();
private function onTimerEvent(event:Event):void{
myFunction(param1,param2);
}
TweenLite [...]
