So I have this AIR app coded in flex where I have several floating native windows and what I want is to detect when a user clicks outside of a window so that I can close it. (I don't want to use the PopupManager Class and would want to use the native windows).
My question is, is there a way to detect a click outside of a spark window, or alternativley is there some root container/object which is a parent to all the native windows so th开发者_StackOverflow社区at a click inside any native window would bubble up to it? (Apparently the stage object of the root windowed application is not that object since each window is not a child of the stage for the root application).
You should use the deactivate event on the component you want to respond to losing active context to the user.
For example
private function startPause(e:MouseEvent):void{
//pause doing memory intensive stuff
}
<mx:VBox paddingLeft="20" deactivate="startPause(null)">
精彩评论