The event flow is conceptually divided into three parts.
Capturing phase:
The first part of the event flow is called the capturing phase, which comprises all of the nodes from the root node to the parent of the target node. During this phase, Flash Player examines each node, starting with the root, to see if it has a listener registered to handle the event. If it does, Flash Player sets the appropriate values of the Event object and then calls that listener. Flash Player stops after it reaches the target node’s parent and calls any listeners registered on the parent.
Targeting phase:
The second part of the event flow is called the targeting phase, which consists solely of the target node. Flash Player sets the appropriate values on the Event object, checks the target node for registered event listeners, and then calls those listeners.
Bubbling phase:
The third part of the event flow is called the bubbling phase, which comprises all of the nodes from the target node’s parent to the root node. Starting with the target node’s parent, Flash Player sets the appropriate values on the Event object and then calls event listeners on each of these nodes. Flash Player stops after calling any listeners on the root node.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment