views:

128

answers:

1

I have a flex app with lots of nested views and popup windows.. I'd love to catch all the CHANGE events in the application at the top level.. all of them, simply to notify the user that he has changed something (trust me it makes sense in my app).

Now, I tried to add an event listener in the Application creationComplete handler like this:

private function init():void {  
    this.addEventListener(flash.events.Event.CHANGE, function f():void {...})
}

but it does not work.. why? I read in the docs that event bubbling for the CHANGE event is set to false before dispatching. How can I change that? Is there any other way to achieve my goal? thanks

+1  A: 

Try listening to events on the SystemManager instead of the Application. As far as I understand, SystemManager sits at the very top of the display list, adding the application, popups and other UI entities as children.

In Flex 3 and below, you can retrieve it via Application.application.systemManager.

Read more on the SystemManager on Deepa's blog: http://iamdeepa.com/blog/?p=11

Stiggler