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

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

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