User Guide
Tween.resume() 1331
Example
This example applies a tweened animation to the img1_mc movie clip. The animation is
looped to play repeatedly from its starting point by calling the
Tween.start() method from
within a handler triggered by the
onMotionFinished event. Clicking a button called
forwardByFrame_btn calls the
Tween.stop() method to stop the animation, followed by
calling the
Tween.prevFrame() method. Clicking the button during the tweened animation
stops the animation and then reverses it by only a single frame. Clicking the
resumeTween_btn button calls the Tween.resume() method, and the tweened animation
resumes. When you create the Tween instance, the
useSeconds parameter is declared false
to make the tween frame-based. This process is required to use the
Tween.nextFrame()
method. A movie clip instance named
img1_mc, a movie clip instance named
resumeTween_btn and a movie clip instance named reverseByFrame_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, 50,
false);
myTween.onMotionFinished = function() {
myTween.start();
};
reverseByFrame_btn.onRelease = function() {
myTween.stop();
myTween.prevFrame();
};
resumeTween_btn.onRelease = function() {
myTween.resume();
};
Tween.resume()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
tweenInstance.resume()