         else if (getStyle("closeEffect") &&
                  stage.nativeWindow.transparent == true)
         {
-            addEventListener("effectEnd", window_closeEffectEndHandler);
+            addEventListener(EffectEvent.EFFECT_END, window_closeEffectEndHandler);
             dispatchEvent(new Event("windowClose"));
             event.preventDefault();
         }

                    e = new FlexEvent(FlexEvent.HIDE);
                    if (getStyle("hideEffect"))
                    {
                        addEventListener("effectEnd", hideEffectEndHandler);
                    }
                    else
                    {

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