Tween.onmotionstarted - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Example
The following example applies a tweened animation to the
animation is looped to play repeatedly from its starting point by calling the
method from within an
calls the
stopTween_btn
value. Clicking a button called resumeTween_btn calls the
resume the tweened animation from its stopping point. When the
is called, the Tween instance invokes the
named
, a movie clip instance named
img1_mc
named
resumeTween_btn
import mx.transitions.Tween;
var myTween:Tween = new Tween(img1_mc, "_x",
mx.transitions.easing.None.easeNone,0, Stage.width, 3, true);
myTween.onMotionFinished = function() {
myTween.start();
};
myTween.onMotionResumed = function() {
trace("onMotionResumed");
};
stopTween_btn.onRelease = function() {
myTween.stop();
};
resumeTween_btn.onRelease = function() {
myTween.resume();
};

Tween.onMotionStarted

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
tweenInstance.onMotionStarted = function() {
// ...
};
event handler. Clicking a button called
onMotionFinished
method to stop the tweened animation at its current
Tween.stop()
onMotionResumed
, are required on the Stage for this example:
img1_mc
Tween.resume()
Tween.resume()
handler. A movie clip instance
, and a movie clip instance
stopTween_btn
Tween.onMotionStarted
movie clip
The
.
Tween.start()
method to
method
1327

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents