Could someone simply explain the 3 phases in the Flash Event framework, please?
By event phases, I mean:
CAPTURING_PHASE
AT_TARGET
BUBBLING_PHASE
To be clear, I'm talking about flash.events.Event
and subclasses.
An in-depth example would be fantastic. What happens when you click on a nested MovieClip
?
With event propagation you're dealing with three "phases" of an event (see Figure 2). Each phase represents a path or the location of an event as it works itself through the display objects in Flash that relate to that event. The three phases of an event are capturing, at target, and bubbling:
Capturing phase: This represents the parent objects of the target object from which the event originated. Any propagated event starts with the topmost parent (stage) and works down the display object hierarchy until reaching the original target.
At target phase: The target phase is the phase where the event is at the target object or the object from which the event originated. Unlike the capturing and bubbling phases, this phase always relates to only one object, the target object.
Bubbling phase: When an event "bubbles" it follows the reverse path of the capturing phase and works its way back up the parent hierarchy of the target object until reaching the top-most parent or stage.
Blatantly stolen from: Introduction to event handling in ActionScript 3.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With