Tween.onMotionStopped

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

tweenInstance.onMotionStopped = function() {
    // ...
};

Description

Event handler; invoked when the tweened animation completes to the end of its animation or when the Tween.stop() method is called. Handling this event allows your code to react at the point at which the tweened animation was stopped.

Example

The following example applies a tweened animation to the img1_mc movie clip. When the Tween instance finishes its animation, the Tween instance invokes the Tween.onMotionStopped event handler. 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.None.easeNone,0, Stage.width-img1_mc._width, 3, true);

myTween.onMotionStopped = function() {
    trace("onMotionStopped");
};