// apply Tween Animation
var myTween:Tween = new Tween(mImage2, “x”, Elastic.easeOut, 0, 300, 3, true);
The above wipe transition and Tween Animation are executed at the same time. I need the Wipe Transition execute first, wait 2 seconds, then execute the Tween Animation. How can I do that? I searched for the “wait” Methods, but no luck.
Most tweening engines have a delay parameter, like TweenLite or Tweener (mentioned). If your using the Adobe one, then I’m not sure it has that feature.
function doNextTween(e:TimerEvent):void{
// apply Tween
var myTween:Tween = new Tween(mImage2, “x”, Elastic.easeOut, 0, 300, 3, true);
timer.removeEventListener(TimerEvent.TIMER, doNextTween);
}
I have another question:
If I want to do more animation one by one with different time intervals. Is it true that I need to create another Timer, do animation, remove the Timer… create another Timer, do animation, remove the Timer again…
Description: Provides an easy way to sequence a set of tweens, one after the other. It’s essentially the same thing as making a bunch of individual TweenMax.to() calls on the object with overwrite set to false, and the delays stacked.
Parameters:
target : Object - The object whose properties to tween.
tweenObjects : Array - An array of tween objects. IMPORTANT: each object must contain a “time” property defining the duration of that tween. Example: TweenMax.sequence(mc, [{time:1, x:“200”}, {time:2, autoAlpha:0, onComplete:myFunction}]);
However I have a problem in using buttons with “Stop”, “Continue Play”, “Back”, etc… to control the playing of movie. The stop(); and mImage.stop(); are not working.
// Goto Loc 2 after go to Loc 1
TweenLite.to (mImage, 3, { x:440, y:350, delay:12, overwrite:false } );
// function to pause animation of mImage
function clickButton(evt:Event):void{
TweenLite.killTweensOf(mImage);
}
// Use button “bStop” to pause the animation
bStop.addEventListener(MouseEvent.CLICK,clickButton);
Could you please provide some guidelines how to “Continue the Play”, “Rewind” and “Forward”? Using all Actionscript to do animation is really new to me.