                      is NativeDragManagerImpl)
             NativeDragManagerImpl(Singleton.getClass("mx.managers::IDragManager").getInstance()).unregisterSystemManager(this);
         SystemManagerGlobals.topLevelSystemManagers.splice(SystemManagerGlobals.topLevelSystemManagers.indexOf(this), 1);
-        myWindow.removeEventListener("close", cleanup);
+        myWindow.nativeWindow.removeEventListener("close", cleanup);
         myWindow = null;
     }
 

            {
                var n:int = forms.length;
                var p:DisplayObject = DisplayObject(event.target);
                var isApplication:Boolean = document.rawChildren.contains(p);
                while (p)
                {
                    for (var i:int = 0; i < n; i++)

import mx.core.IUIComponent;
import mx.core.Singleton;
import mx.core.SWFBridgeGroup;
import mx.core.IWindow;
import mx.core.mx_internal;
import mx.events.FlexEvent;
import mx.events.FlexChangeEvent;
