Search code examples
apache-flexairwindownativerollover

Flex Air RollOver on inactive Native Window


I have a Native Window in Flex AIR. Let's say the window doesn't have a focus. It is inactive. Is it possible to find out when mouse is over such window? The window is always in front. I heard that it is possible by checking stage.mouseX in ENTER FRAME handler. But maybe there is a more elegant solution ?


Solution

  • I would look into using the MouseEvent.MOUSE_OVER event; which I would expect to fire whenever the mouse enters the window.

    The only issue I see is that the NaiveWindow class does not document mouse events. So, the mouse event will most likely have to be dispatched from one of the children of the NativeWindow. You may try adding a a transparent image as the background, or something similar, and listen for the event on that image.