Add an eventlistener and set useCapture to true.
For some reason that doesn't seem to work. I suspect that event bubbling only goes up to the application, not down past the triggering component.
There are 3 event phases capturing, targetting and bubbling. You could
read the documentation about the event flow in order to know more
The documentation states:
"Event flow: When events happen to an object on the display list (an object displayed on the screen), all the objects that contain the object are notified of the event and notify their event listeners in turn. This process starts with the Stage and proceeds through the display list to the actual object where the event occurred, and then proceeds back to the Stage again. This process is known as the event flow."
The documentation doesn't give any indication of how a child to the triggering object could receive the event, which was my question.
I didnt' mean to tell you RTFM, normally the documentation is better to help people understand how something works in Flex.
In this example, the capture phase comprises Stage and Parent Node during the initial downward journey. The target phase comprises the time spent at Child1 Node. The bubbling phase comprises Parent Node and Stage as they are encountered during the upward journey back to the root node.
The capture phase goes from the top parent down in the display list looking for an event listener. Now you must know that if you set an event using useCapture that event won't bubble, so if you need to set an event that targets both phases you must add two event listener
OK- so let me clarify my problem-
I have a container... a VBox with multiple canvas children in it. Each of those children have a check box control in them. I am looking for a way to reset the states of the check boxes by issuing an event at the VBox level. At this point I've solved (rather in-eligantly) the problem by looping thru each of the children and resetting the the check boxes by calling a function in the canvas. It seems to me that a better approach would be to set an event and have each of the children respond to it by clearing their own check box, but I can't get the children to see the event.
So I was wondering if there is a way of handling event propagation to children. Maybe I'm barking up (down) the wrong tree.
Oh I see, then I don't think you can do that, Because the capturing phase goes from the top parent until the parent of the control that dispatch the event, and bubbling goes from the control that dispatch the event all the way up. As far as I know you can go from the top to the bottom in the display list I guess that's because of performance because it that were an option the FP will look from an event listener in every single component within your app. So what you're doing is the right way, setting the event listener in the VBox that dispatches the event and then setting the Canvas in it.