About the Tween and TransitionManager classes 489
For information on each method and property of the Tween class, see Chapter 51, “Tween
class” in the Components Language Reference. For information on each method and property of
the TransitionManager class, see Chapter 48, “TransitionManager class” in the Components
Language Reference.
You can find a sample source file that adds scripted animation using these classes. Find
tweenProgress.fla in the Samples folder on your hard disk.
■ In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Tween ProgressBar.
■ On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Tween ProgressBar.
About the Tween class
The Tween class lets you move, resize, and fade movie clips easily on the Stage. The
constructor for the mx.transitions.Tween class has the following parameter names and types:
function Tween(obj, prop, func, begin, finish, duration, useSeconds) {
// code ...
}
obj
The movie clip object that the Tween instance targets.
prop A string name of a property in obj to which the values are to be tweened.
func The easing method that calculates an easing effect for the tweened object’s
property values.
begin A number that indicates the starting value of prop (the target object property to
be tweened).
finish A number that indicates the ending value of prop (the target object property to
be tweened).
duration A number that indicates the length of time of the tween motion. If omitted, the
duration is set to
infinity by default.
useSeconds A Boolean value related to the value you specify in the duration parameter,
which indicates to use seconds if
true, or frames if false.
TIP
To preview how each transition works with the different methods in the easing classes,
you can double-click Transition.swf in boot drive\Program Files\Macromedia\Flash
8\language\First Run\Behaviors\ or Macintosh HD:Applications:Macromedia Flash
8:First Run:Behaviors: to open the SWF file in the stand-alone player.