MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1246

Components language reference
Table of Contents

Advertisement

The usage example uses a dispatcher or listener event model. A TransitionManager instance
(
transitionManagerInstance
and the event is handled by a function, also called a handler, on a listener object
(
) that you create. You define a method with the same name as the event on
listenerObject
the listener object; the method is called when the event is triggered. When the event is
triggered, it automatically passes an event object (
method. Each event object has properties that contain information about the event. In this
case, the
allTransitionsInDone
of TransitionManager that fired the event, so you can use that instance and all its properties
and methods within the code that receives the
information, see
Chapter 21, "EventDispatcher class," on page
Example
The following code assigns an object to listen for the
specifies the method to act as the handler for the event. When that method is called to handle
the event, a transition with a direction property of
already completed.
import mx.transitions.*;
import mx.transitions.easing.*;
var myTransitionManager:TransitionManager = new TransitionManager(img1_mc);
myTransitionManager.startTransition({type:Iris, direction:Transition.OUT,
duration:1, easing:None.easeNone,startPoint:5, shape:Iris.CIRCLE});
var myListener:Object = new Object();
myListener.allTransitionsOutDone = function(eventObj:Object) {
trace("allTransitionsOutDone event occurred.");
};
myTransitionManager.addEventListener("allTransitionsOutDone", myListener);
See also
Chapter 21, "EventDispatcher class," on page 499
1242
TransitionManager class
) dispatches an event (in this case,
eventObject
event provides a target property that contains the instance
allTransitionsInDone
mx.transitions.Transition.IN
allTransitionsOutDone
) to the listener object
event. For more
499.
allTransitionsOutDone
)
event and
has

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents