Wednesday 6 February 2008

A Lightweight (2K) and FAST Tweening Engine in AS3: TweenLite

While we a re still waiting for Zigo/Fuse to update their engine, I started using TweenLite, and really start liking it.
http://blog.greensock.com/tweenliteas3/
It is light (2kB), and fast, does rely on flashes built in easing classes though. It is rather basic, but useful for almost all purposes.
here a simple example, of a sequenced animation with :

import gs.TweenLite;
import fl.motion.easing.Elastic;
TweenLite.to(mc_my, 0.8, {x:120, y:143,ease:Elastic.easeOut,delay:2,onComplete:onFinishTween, onCompleteParams:[5, mc_my],overwrite:false});
private function onFinishTween(Num,target_mc){
trace("tween finished "+target_mc
}

No comments: