Reputation: 1224
I have an activate and deactivate event handlers for the main Application that trigger when the user clicks inside or outside the browser or flex application browser window. Due to some subtle changes I made to my app (I suspect unforeseen by Adobe) activate and deactivate events are no longer triggered. Is there a hasFocus type function I can call instead in enterFrame for example
Upvotes: 0
Views: 211
Reputation: 3581
I'd suggest adding event handlers in JavaScript listening to the focus & blur events of the Flash DOM object. If either of these events fires, via externalInterface you can inform the Flash movie and handle it as desired.
Flash has an event for Event.ACTIVATE and a MOUSE_OUT mouse event when the mouse leaves the stage, but they're not always very accurate. The MOUSE_OUT event, in particular, won't fire if you're holding down a mouse button as you drag outside. Really, JavaScript is the best bet here.
Upvotes: 2