Archive for May, 2009

Another Reason to Love TweenLite

Saturday, May 30th, 2009

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:
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 [...]


Bad Behavior has blocked 1185 access attempts in the last 7 days.