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()stopImmediatePropagation()
Terminator.mxml
<?xml version = '1.0' encoding = 'ISO-8859-1'?>
|
Terminator.swf
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Flex terminating event flow example
Post your Comment