Return to table of contents
In ApplicationUI.mxml (init()), you will find the following two lines:
// in ApplicationUI.mxml, in init()
titleControls.addEventListener( “showHelp”, showHelpScreen );
addEventListener( “close”, closePanel );
This is a little bit strange. One uses titleControls as event listener, the other uses ApplicationUI. It turns out this is due to the bubbling of event.
// in TitleControls.mxml
// in EmployeeView.mxml
Note that the “true” argument in the second case. It allows the Event to bubble to the parent components (ApplicationUI). That’s why ApplicationUI can hear the event. If you add “true” argument in the TitleControls.mxml, you can also use ApplicationUI to listen to the event.
Learning Employee Directory 5.1 Event bubble
24 sec read