DEACTIVATE event is better

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Glenn Jones
Sent: Friday, June 20, 2008 6:10 AM
To: [email protected]
Subject: [flexcoders] focus out of the flash player

 

I have a requirement to dismiss a dialog if the flash player loses focus
(e.g. someone clicks outside of the player).
I'm using the Flex 2.0.01 SDK (hotfix 3) with IE 7 and Flash Player 9.

I've registered a FOCUS_OUT event handler on the stage. That seems to
work, but I've run into a case where the event
is ambiguous. I've been keying off of "if (event.relatedObject == null)
//then assume the player's lost focus".

The problem is that if my dialog contains a DropDown and the DropDown is
opened, then I'm getting an event that
also has a null value for relatedObject. I don't want to close the
dialog if someone opens a DropDown :-)

I've also tried focus-out handlers on the root and the dialog window
objects (my dialog is subsclass of TitleWindow), 
but they have a similar result.

Any suggestions?

Is there another sort of event that will tell me when the Player has
lost focus to the browser or another app?

Thanks,
Glenn

 

Reply via email to