I'm not sure that you need to worry about the FocusManager given you want it to 
go away on a click.

One way I would handle it would be to add an event listener to the stage and 
listen for MouseEvent.MOUSE_DOWN.  Check the target and if the target is not 
anything in your popup, then close the popup.  You can use the "contains" 
method for this.

You may also consider adding a small close button to your popup just in case 
the user doesn't realize they just have to click somewhere else to hide it.

Remember to remove the event listener when you're done.

--- In [email protected], Glenn Jones <tgjone...@...> wrote:
>
> I have a popup that's opened in the usual way with the popup manager.  It's
> not modal.
> Sometimes the controls within the popup are enabled so that the user can
> interact with them,
> and sometimes the controls are disabled because the contents are read-only.
> 
> As soon as the user clicks anywhere else in the application, I'd like to
> close the popup.
> 
> Is there an easy way to do that?
> 
> Based on what I've read, the popup should have it's own instance of
> FocusManager, and that
> FocusManager should receive a deactive() call if the user clicks somewhere
> else. So I thought
> about extending the FocusManager with some new class designed to close the
> parent form
> on deactivate.  But was hoping there was a better way.
> 
> Thanks,
> Glenn
>


Reply via email to