  *  @eventType mx.events.AIREvent.APPLICATION_DEACTIVATE
  */
 [Event(name="applicationDeactivate", type="mx.events.AIREvent")]
+
+/**
+ *  Dispatched after this application window has been activated.
+ *
+ *  @eventType mx.events.Event.ACTIVATE
+ */
+[Event(name="windowActivate", type="flash.events.Event")]
+
+/**
+ *  Dispatched after this application window has been deactivated.
+ *
+ *  @eventType mx.events.Event.DEACTIVATE
+ */
+[Event(name="windowDeactivate", type="flash.events.Event")]
+ 
+/**
+ *  Dispatched after this application window has been closed.
+ *
+ *  @eventType flash.events.Event.CLOSE
+ *
+ *  @see flash.display.NativeWindow
+ */
+[Event(name="close", type="flash.events.Event")]
 
 /**
  *  Dispatched before the WindowedApplication window closes.

    	else
    		dispatchEvent(event);
    }

    /**
     *  This is a temporary event handler which dispatches a initialLayoutComplete event after
     *  two updateCompletes. This event will only be dispatched after either setting the bounds or

    /**
     *  @private
     */
    private function window_closeHandler(event:Event):void
    {
        dispatchEvent(new Event("close"));
    }
        
    /**
     *  @private
     */
    private function window_resizeHandler(event:NativeWindowBoundsEvent):void
    {
        windowBoundsChanged= true;
