ActionScript 2.0 Components Language Reference |
|
|
|
| Tween class > Tween.stop() | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
tweenInstance.stop()
Nothing.
Method; stops the play of a tweened animation at its current value.
The following example applies a tweened animation to the _x property of the img1_mc movie clip. A stopTween_btn movie clip's onRelease() handler calls the Tween.stop() method to stop the tweened animation and a resumeTween_btn movie clip's onRelease() handler calls the Tween.resume() method to resume the animation from a stopped position. A movie clip instance named img1_mc, a movie clip instance named stopTween_btn, and a movie clip instance named resumeTween_btn, are required on the Stage for this example:
import mx.transitions.Tween;
var myTween:Tween = new Tween(img1_mc, "_x", mx.transitions.easing.None.easeNone, img1_mc._width, Stage.width, 8, true);
myTween.onMotionFinished = function() {
myTween.start();
};
stopTween_btn.onRelease = function() {
myTween.stop();
};
resumeTween_btn.onRelease = function() {
myTween.resume();
};
|
|
|
|