While I was browsing /3dcg/, I came across this little gem!! So far it’s certainly made my life easier!! Download it and perfect your maps!
Posts Tagged ‘max’
Wow! An Extremely Useful indexed UVW unwrap map!!!
Monday, March 15th, 2010(AS3) – Tweenlite delayedCalls();
Saturday, January 9th, 2010Tweenlite/Max is easily my favorite AS3/AS2 Tween Engine. Here’s a quick code snippet that most people do not know about!! If you enjoy using timers in AS3 check out the “delayedCall()” function in TweenMax/Lite. The key argument here is scalability, after a while using 1 line of codeĀ (delayedCall) becomes a lot more convenient then the more involved timer class.
Std. Timer listener dispatch + function
package {
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.display.Sprite;
public class TimerExample extends Sprite {
public function TimerExample() {
var myTimer:Timer = new Timer(1000, 2);
myTimer.addEventListener("timer", timerHandler);
myTimer.start();
}
public function timerHandler(event:TimerEvent):void {
trace("timerHandler: " + event);
}
}
}
VS.
Std. Tweenlite/Max delayedCall (v.11)
package {
import com.greensock.*;
import flash.display.Sprite;
public class DelayedCallExample extends Sprite {
public function DelayedCallExample() {
TweenLite.delayedCall(0.5, myDelayedCall, [1,true]);
}
public function myDelayedCall(argument1:Number,Boolean):void {
trace("that was easy!");
}
}
}
myD





