ActionScript 2.0 Components Language Reference |
|
|
|
| Tween class > Tween.start() | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
tweenInstance.start()
Nothing.
Method; starts the play of a tweened animation from its starting point. This method is used for re-starting a Tween from the beginning of its animation after it stops or has completed its animation.
This example creates a new Tween object that animates the _x property of the img1_mc movie clip. After the tweened animation is complete and calls the Tween.onMotionFinished event handler, the tween is played again by calling the Tween.start() method. The result is a movie clip that moves across the Stage from left to right and then starts the animation over again when it reaches the end of the Stage. 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, 50, false);
myTween.onMotionFinished = function() {
myTween.start();
};
|
|
|
|