 import mx.core.windowClasses.StatusBar;
 import mx.core.windowClasses.TitleBar;
 import mx.events.AIREvent;
+import mx.events.EffectEvent;
 import mx.events.FlexEvent;
 
 import mx.events.FlexNativeWindowBoundsEvent;

    {
        if (!nativeWindow.closed)
            stage.nativeWindow.minimize();
        removeEventListener("effectEnd", windowMinimizeHandler);
    }

    /**

     */
    private function window_closeEffectEndHandler(event:Event):void
    {
        removeEventListener(EffectEvent.EFFECT_END, window_closeEffectEndHandler);
        if (!nativeWindow.closed)
            stage.nativeWindow.close();
    }
