How to create a 'global event' in actionscript / flex?
-
08-07-2019 - |
Question
What is the best way to create a 'global event' in flex/actionscript - preferably using a static class?
I want to raise an event to indicate that a stylesheet is loaded in order to show components that require that stylesheet. So I want each portion of the application that requires a style from the stylesheet to listen to an event telling it that the styles are all loaded.
Solution
Use robotlegs, simple and Singleton free!
OTHER TIPS
Make a Singleton and add listeners to it, nice and simple.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow