      */
     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
                {

            nativeApplication.addEventListener(Event.ACTIVATE, nativeApplication_activateHandler, false, 0, true);
            nativeApplication.addEventListener(Event.DEACTIVATE, nativeApplication_deactivateHandler, false, 0, true);
            nativeApplication.addEventListener(Event.NETWORK_CHANGE, dispatchEvent, false, 0, true);
            _nativeWindow.addEventListener(Event.ACTIVATE, nativeWindow_activateHandler, false, 0, true);
            _nativeWindow.addEventListener(Event.DEACTIVATE, nativeWindow_deactivateHandler, false, 0, true);
            
            addEventListener(Event.ENTER_FRAME, enterFrameHandler);
            
