Read up on the DOM event model and event bubbling. This essentially lets you listen for (some) events on the Application object itself. Any bubbling events dispatched by children of the Application (or their children, and so on) eventually bubble up to Application itself, and you can listen for them there.
Thanks for the info.But I need to create a component which will do something when a partiuclar type of event is triggered in an application.For eg,I will create a custom HBox so that whenever a particular type of event is triggered in the application,its colour will be changed.But in the application,I should not use this component identifier.(Application doesnot know about this compoent)
Try adding the event listener to the systemManager:
Then check the currentTarget/target.
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Can u explain this,pls..? U mean,I should use systemManager.addEventListener(MouseEvent.CLICK, test); in the constructor of my custom component ? Then if I add this component in my application and not using any event listener for this in that application,the method "test()" will be invoked when CLICK event is triggered from any of the compoents in the application ? Please expain...