ActionScript 2.0 Components Language Reference |
|
|
|
| Tween class > Tween.FPS | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
tweenInstance.FPS
Property; the number of frames per second calculated into the tweened animation. By default the current Stage frame rate is used to calculate the tweened animation. Setting this property recalculates the number of increments in the animated property that is displayed each second to the Tween.FPS property rather than the current Stage frame rate. Setting the Tween.FPS property does not change the actual frame rate of the Stage.
|
NOTE |
The Tween.FPS property returns undefined unless it is first set explicitly. |
The following example creates two tweened animations set at two different FPS settings. The current FPS settings of both Tween instances are displayed. A movie clip instance named img1_mc, and a movie clip instance named img2_mc are required on the Stage for this example:
import mx.transitions.Tween;
var myTween1:Tween = new Tween(img1_mc, "_y", mx.transitions.easing.Strong.easeOut,0, Stage.height - img1_mc._height, 400, false);
myTween1.FPS = 1;
var myFPS1:Number = myTween1.FPS;
trace("myTween1.FPS:" + myFPS1);
var myTween2:Tween = new Tween(img2_mc, "_y", mx.transitions.easing.Strong.easeOut,0, Stage.height - img2_mc._height, 400, false);
myTween2.FPS = 12;
var myFPS2:Number = myTween2.FPS;
trace("myTween2.FPS:" + myFPS2);
|
|
|
|