ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
fl.transitions 

TransitionManager  - AS3 Flash

Packagefl.transitions
Classpublic class TransitionManager
InheritanceTransitionManager Inheritance EventDispatcher Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9, AIR 1.0

The TransitionManager class defines animation effects. It allows you to apply one of ten animation effects to movie clips. When creating custom components, you can use the TransitionManager class to apply animation effects to movie clips in your component's visual interface. The transition effects in fl.transitions.easing are defined as a set of transition classes that all extend the base class fl.transitions.Transition. You apply transitions through an instance of a TransitionManager only; you do not instantiate them directly. The TransitionManager class implements animation events.

You can create a TransitionManager instance in two ways:

  • Call the TransitionManager.start() method. This is the simplest and recommended way to create a TransitionManager instance.
  • Use the new operator. You then designate the transition properties and start the transition effect in a second step by calling the TransitionManager.startTransition() method.

Related API Elements



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  content : MovieClip
The movie clip instance to which TransitionManager is to apply a transition.
TransitionManager
  contentAppearance : Object
[read-only] An object that contains the saved visual properties of the content (target movie clip) to which the transitions will be applied.
TransitionManager
Public Methods
 MethodDefined By
  
Constructor function for creating a new TransitionManager instance.
TransitionManager
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
[static] Creates a new TransitionManager instance, designates the target object, applies a transition, and starts the transition.
TransitionManager
  
Creates a transition instance and starts it.
TransitionManager
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
Property Detail

content

property
content:MovieClip

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9, AIR 1.0

The movie clip instance to which TransitionManager is to apply a transition.



Implementation
    public function get content():MovieClip
    public function set content(value:MovieClip):void

contentAppearance

property 
contentAppearance:Object  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9, AIR 1.0

An object that contains the saved visual properties of the content (target movie clip) to which the transitions will be applied.



Implementation
    public function get contentAppearance():Object
Constructor Detail

TransitionManager

()Constructor
public function TransitionManager(content:MovieClip)

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9, AIR 1.0

Constructor function for creating a new TransitionManager instance. However, the TransitionManager.start() method is a more efficient way of creating and implementing a TransitionManager instance. If you do use the TransitionManager constructor function to create an instance, use the new operator then designate the transition properties and start the transition effect in a second step by calling the TransitionManager.startTransition() method.

For example:

  import fl.transitions.*;
  import fl.transitions.easing.*;
      
  var myTransitionManager:TransitionManager = new TransitionManager(myMovieClip);
  myTransitionManager.startTransition({type:Zoom, direction:Transition.IN, duration:1, easing:Bounce.easeOut});
  
Parameters
content:MovieClip — The MovieClip object to which to apply the transition effect.

Related API Elements

Method Detail

start

()method
public static function start(content:MovieClip, transParams:Object):fl.transitions:Transition

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9, AIR 1.0

Creates a new TransitionManager instance, designates the target object, applies a transition, and starts the transition. Specifically, calling this method creates an instance of the TransitionManager class if one does not already exist, creates an instance of the specified transition class designated in the transParams parameter, and then starts the transition. The transition is applied to the movie clip that is designated in the content parameter.

For example:

  import fl.transitions.*;
  import fl.transitions.easing.*;
    
  TransitionManager.start(myMovieClip, {type:Zoom, direction:Transition.IN, duration:1, easing:Bounce.easeOut});
  

Parameters

content:MovieClip — The MovieClip object to which to apply the transition effect.
 
transParams:Object — A collection of parameters that are passed within an object. The transParams object should contain a type parameter that indicates the transition effect class to be applied, followed by direction, duration, and easing parameters. In addition, you must include any parameters required by that transition effect class. For example, the fl.transitions.Iris transition effect class requires additional startPoint and shape parameters. So, in addition to the type, duration, and easing parameters that every transition requires, you would also add (to the transParams object) the startPoint and shape parameters that the fl.transitions.Iris effect requires.

Returns
fl.transitions:Transition — The Transition instance.

startTransition

()method 
public function startTransition(transParams:Object):fl.transitions:Transition

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9, AIR 1.0

Creates a transition instance and starts it. If a matching transition already exists, the existing transition is removed and a new transition is created and started. This method is used in conjunction with the constructor function.

For example:

  import fl.transitions.*;
  import fl.transitions.easing.*;
        
  var myTransitionManager:TransitionManager = new TransitionManager(myMovieClip);
  myTransitionManager.startTransition({type:Zoom, direction:Transition.IN, duration:1, easing:Bounce.easeOut});
  

Alternatively, you can use the TransitionManager.start() method, which is a more efficient way of implementing a transition effect.

Parameters

transParams:Object — A collection of parameters that are passed within an object. The transParams object should contain a type parameter that indicates the transition effect class to be applied, followed by direction, duration, and easing parameters. In addition, you must include any parameters required by that transition effect class. For example, the fl.transitions.Iris transition effect class requires additional startPoint and shape parameters. So, in addition to the type, duration, and easing parameters that every transition requires, you would also add (to the transParams object) the startPoint and shape parameters that the fl.transitions.Iris effect requires.

Returns
fl.transitions:Transition — The Transition instance.

Related API Elements