Example
This example applies a tweened animation to the
looped to play repeatedly from its starting point by calling the
within a handler triggered by the
forwardByFrame_btn calls the
calling the
Tween.prevFrame()
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
to make the tween frame-based. This process is required to use the
method. A movie clip instance named
and a movie clip instance named
resumeTween_btn
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()
img1_mc
onMotionFinished
method to stop the animation, followed by
Tween.stop()
method. Clicking the button during the tweened animation
useSeconds
, a movie clip instance named
img1_mc
movie clip
The animation is
.
Tween.start()
event. Clicking a button called
parameter is declared
Tween.nextFrame()
reverseByFrame_btn
Tween.resume()
method from
false
are required on
1331