User Guide

Tween.onMotionFinished 1325
Description
Event handler; invoked with each change in the tweened object property that is being
animated. Handling this event allows your code to react as the target movie clips property
that is being tweened increments to the next value.
Example
In this example, a tween is applied to the img1_mc movie clip. With each increment of the
tween to the
_x property of the movie clip, the onMotionChanged event handler is invoked
and displays a trace message indicating the tweened movie clips new position. 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.onMotionChanged = function() {
trace( this.position );
};
Tween.onMotionFinished
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
tweenInstance.onMotionFinished = function() {
// ...
};
Description
Event handler; invoked when the animation reaches the end of its duration. Handling this
event allows your code to react at the point at which the tweened animation is finished.