Tween.continueTo()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

tweenInstance.continueTo(finish, duration)

Parameters

finish A number indicating the ending value of the target object property that is to be tweened.

duration A number indicating the length of time or number of frames for the tween motion; duration is measured in length of time if the Tween.start() useSeconds parameter is set to true, or measured in frames if it is set to false. For more information on the useSeconds parameter, see Tween.start().

Returns

Nothing.

Description

Method; instructs the tweened animation to continue tweening from its current animation point to a new finish and duration point.

Example

In this example a handler is triggered by the onMotionFinished event and tells a Tween instance to continue its animation with new finish and duration values by calling the Tween.continueTo() method. 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, "_y", mx.transitions.easing.Elastic.easeOut,0, 200, 3, true);
myTween.onMotionFinished = function() {
    var myFinish:Number = 100;
    var myDuration:Number = 5;
    myTween.continueTo( myFinish, myDuration );
};