ActionScript 2.0 Components Language Reference |
|
|
|
| TransitionManager class > TransitionManager.allTransitionsOutDone | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
var listenerObject:Object = new Object();
listenerObject.allTransitionsOutDone = function(eventObj:Object) {
// ...
};
transitionManagerInstance.addEventListener("allTransitionsOutDone", listenerObject);
Event; notifies listeners that the TransitionManager instance has completed all transitions that have a direction property of "out" and has removed them from the list of transitions it is to apply.
The usage example uses a dispatcher or listener event model. A TransitionManager instance (transitionManagerInstance) dispatches an event (in this case, allTransitionsOutDone) and the event is handled by a function, also called a handler, on a listener object (listenerObject) that you create. You define a method with the same name as the event on the listener object; the method is called when the event is triggered. When the event is triggered, it automatically passes an event object (eventObject) to the listener object method. Each event object has properties that contain information about the event. In this case, the allTransitionsInDone event provides a target property that contains the instance of TransitionManager that fired the event, so you can use that instance and all its properties and methods within the code that receives the allTransitionsInDone event. For more information, see EventDispatcher class.
The following code assigns an object to listen for the allTransitionsOutDone event and 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 mx.transitions.Transition.IN has 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);
|
|
|
|