One of the most popular AS3 tween engines in Zeh Fernando’s Tweener. Another tween engine I just found out about is Jack Doyle’s TweenLite. Both are great lightweight engines that provide a convenient syntax for handling tweens.
There is also Flash’s built in syntax for handling tweens. Until today I thought that calling an AS3 tween in Flash required the Flex framework, but it turns out that in addition to Flex’s mx.effects.Tween there is also a Tween class built into the Flash Player: fl.transitions.Tween. This works exactly like Flash’s AS2 tween class.
So, which is the best one to use? Tweener and TweenLite both offer an easier way to handle multiple tweens, delayed tweens, color tweens and more. TweenLite is smaller at 2k, over Tweener’s 10k. I haven’t dug into all the details of both, but for most cases, TweenLite does everything you need.
One other thing I love about TweenLite is that by default it will overwrite previous tweens to the same object. This means if you apply many tweens to the same object (for example a button color tween on rollover/rollout), you won’t start piling up tween objects in memory. In practice, the memory usage for a tween object is very small, but its nice to know that over a long period of time youre SWF won’t be leaking memory.






Latest Tweets