Flash 8 Documentation |
|||
| Components Language Reference > Tween class | |||
Inheritance (Root class)
ActionScript Class Name mx.transitions.Tween
The Tween class lets you use ActionScript to move, resize, and fade movie clips easily on the Stage by specifying a property of the target movie clip to be tween animated over a number of frames or seconds. The Tween class also lets you specify a variety of easing methods. Easing refers to gradual acceleration or deceleration during an animation, which helps your animations appear more realistic. For example, the options on a drop-down list component you create might gradually increase their speed near the beginning of an animation as the options appear, but slow down before the options come to a full stop at the end of the animation as the list is extended. Flash provides many easing methods that contain equations for this acceleration and deceleration, which change the easing animation accordingly.
The Tween class also invokes event handlers so your code may respond when an animation starts, stops, or resumes or increments its tweened property value. For example, you can start a second tweened animation when the first tween invokes its Tween.onMotionStopped event handler, indicating that the first tween has stopped.
The following table lists methods of the Tween class:
|
Method |
Description |
|---|---|
|
Instructs the tweened animation to continue from its current value to a new value. |
|
|
Forwards the tweened animation directly to the end of the animation. |
|
|
Forwards the tweened animation to the next frame. |
|
|
Directs the tweened animation to the frame previous to the current frame. |
|
|
Resumes a tweened animation from its stopped point in the animation. |
|
|
Rewinds a tweened animation to the beginning of the tweened animation. |
|
|
Starts the tweened animation from the beginning. |
|
|
Stops the tweened animation at its current position. |
|
|
Returns the class name, "[Tween]". |
|
|
Instructs the tweened animation to play in reverse from its last direction of tweened property increments. |
The following table lists properties of the Tween class.
|
Property |
Description |
|---|---|
|
The duration of the tweened animation in frames or seconds. Read-only. |
|
|
The last tweened value for the end of the tweened animation. Read-only. |
|
|
The number of frames per second of the tweened animation. Read-only. |
|
|
The current value of the target movie clip's property being tweened. Read-only. |
|
|
The current time within the duration of the animation. Read-only. |
The following table lists event handlers of the Tween class.
|
Event |
Description |
|---|---|
|
Event handler; invoked with each change in the tweened object's property that is being animated. |
|
|
Event handler; invoked when the Tween object finishes its animation. |
|
|
Event handler; invoked when the |
|
|
Event handler; invoked when the |
|
|
Event handler; invoked when the |
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00004142.html
Comments
dtotal said on Oct 5, 2005 at 9:46 AM : nowB@ said on Oct 18, 2005 at 11:47 AM :