Findings (so far)
- Chrome, Firefox, and Safari receive activate and deactivate events if the browser loads the SWF directly, but NOT if the SWF is loaded inside of an HTML page.
- When the SWF is loaded directly, activate is not dispatched when re-focusing on the browser by clicking the flex app; a second click is required.
This is really a pain. One suggested hack is to look for the MOUSE_LEAVE event (when the user moves the mouse off of the flex app). That works well when UI elements are draggable and you need to handle the case of the mouse leaving the flex app while dragging, but it isn't a valid indicator of whether the flex app still has focus. For example, in JamLegend, the user can move the mouse anywhere and they can still play as long as the flex app has focus (thus receiving key events).
- OS X 10.6.2
- Flash Player 10,0,42,34
- Chrome 5.0.307.7 beta
- Safari 4.0.4
- Firefox 3.5.5.