In the example below, how to terminate an event flow is demonstrated. With this example the motive of previous event phase detecting example as well as a new flex feature zooming components are also demonstrated. Now in the example several pop-up alert windows are set to open with the mouse click events on the flex controls and containers.
A mouse click event on button control b1 inside the title window pop-ups two to three alert windows. Two method statements as arguments are passed in two different event handlers to stop the event propagation. You have to just remove the slashes and see the methods working. Methods stop the event object on moving to next node or task, here the task defined is to switch the listeners containing .show method of alert class. For doing this job either of the below mentioned methods can be used.stopPropagation()
Posted on: June 11, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles