User Guide

1314 Tween class
duration A number indicating the length of time of the tween motion. If omitted, the
duration is set to infinity by default.
useSeconds A Boolean value indicating to use seconds if true or frames if false in relation
to the value specified in the
duration parameter.
About easing classes and methods
When you create an instance of the Tween class, you use the func parameter to specify a
function or method that provides an easing calculation. Flash provides five easing classes, each
with three methods that indicate which part of the transitional motion to apply the easing
effect to: at the beginning of the animation, the end, or both. In addition, a
None easing class
with an
easeNone method is available for designating that no easing be used.
The following classes and components use the easing classes and methods:
The mx.transitions.Tween class for easing effects on a tweened animation
The mx.transitions.TransitionManager class for easing effects on transitions. See Chapter
48, “TransitionManager class,” on page 1237.
Some components in version 2 of the Macromedia Component Architecture. See
Applying easing methods to components” on page 1315
The six easing calculation classes are described in the following table:
Easing Class Description
Back Extends the animation once beyond the transition range at one or both
ends to give the effect of being pulled back from beyond its range.
Bounce Adds a bouncing effect within the transition range at one or both ends.
The number of bounces relates to the duration—longer durations
produce more bounces.
Elastic Adds an elastic effect that falls outside the transition range at one or
both ends. The amount of elasticity is unaffected by the duration.
Regular Adds slower movement at one or both ends. This feature lets you add a
speeding up effect, a slowing down effect, or both.
Strong Adds slower movement at one or both ends. This effect is similar to the
Regular easing class, but it’s more pronounced.
None Adds an equal movement from start to end without effects, slowing, or
speeding up. This transition is also called a linear transition.