Tween.onmotionfinished - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Description
Event handler; invoked with each change in the tweened object property that is being
animated. Handling this event allows your code to react as the target movie clip's property
that is being tweened increments to the next value.
Example
In this example, a tween is applied to the
tween to the
property of the movie clip, the
_x
and displays a trace message indicating the tweened movie clip's new position. A movie clip
instance named
img1_mc
import mx.transitions.Tween;
var myTween:Tween = new Tween(img1_mc, "_x",
mx.transitions.easing.Elastic.easeOut,0, Stage.width-img1_mc._width, 3,
true);
myTween.onMotionChanged = function() {
trace( this.position );
};

Tween.onMotionFinished

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
tweenInstance.onMotionFinished = function() {
// ...
};
Description
Event handler; invoked when the animation reaches the end of its duration. Handling this
event allows your code to react at the point at which the tweened animation is finished.
img1_mc
is required on the Stage for this example:
movie clip. With each increment of the
event handler is invoked
onMotionChanged
Tween.onMotionFinished
1325

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents