User Guide

1326 Tween class
Example
In the following example, a tween is applied to the img1_mc movie clip. When the tween
reaches the end of its animation, it invokes the
onMotionFinished event handler which calls
the
Tween.yoyo()method. The tween is therefore able to complete its animation before the
Tween.yoyo() method is called to reverse the animation. A movie clip instance named
img1_mc is required on the Stage for this example:
import mx.transitions.Tween;
var myTween:Tween = new Tween(img1_mc, "_x",
mx.transitions.easing.Elastic.easeOut,0, Stage.width-img1_mc._width, 3,
true);
myTween.FPS = 30;
myTween.onMotionFinished = function() {
myTween.yoyo();
};
Tween.onMotionResumed
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
tweenInstance.onMotionResumed = function() {
// ...
};
Description
Event handler; invoked when the Tween.resume() method is called. Handling this event
allows your code to react at the point at which the tweened animation was resumed.