Letting DisplayObjects Find the Main WindowedApplication in AIR
Posted by: Keith H in Adobe AIR, Flex, tags: Adobe AIR, Cursor, Flex, WindowedApplicationHere is a way to let a DisplayObject find the main WindowedApplication on its own...
In my AIR application I have other AIR Windows floating over the main AIR Window.
I wanted one of my UIComponents to be draggable like a cursor, but when my mouse dragged the object
over the other floating windows I wanted my original cursor to show again and hide my dragged UIComponent.
The reason behind this is if I wanted to apply "context sensitive" behaviors depending on what or which window the mouse is in.
To do this, the main WindowedApplication needed some ROLL_OUT and ROLL_OVER events added to it to detect when the mouse rolls in and out.
The "getAIRAppWindow" method below finds the main WindowedApplication so I can add the listeners to it from there.
Here are some snippets explaining what I did:
Entries (RSS)