Hello folks,
I’m trying to figure out how to use actionscript to start a new tween upon the completion of a prior tween. For example, say I want to make a movie clip tween in width, and when it’s completed tweening width, then tween its height…
I’ve figured out importing the classes and using this method to tween:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var twWidth:Tween = new Tween(mcBG, "_width", Elastic.easeOut, mcBG._width, 300, 2, true);
And then I’ve read about creating this listener to get a flag on the completion of a tween:
var oListener:Object = new Object();
oListener.onMotionFinished = function(twObject:Tween):Void {
//***do some action, ie, call a function to run the next tween, etc...
}
twWidth.addListener(oListener);
But there must be an easier way to chain together tweens…to find out when one tween ends to begin another…my attempt doesn’t seem too efficient…how are you smartypants doing it?
Thanks!