Created
January 18, 2010 08:09
-
-
Save arpit/279876 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" | |
layout="absolute" width="400" height="300" creationComplete="minimizeToDock()"> | |
<mx:Label text="Dockable" horizontalCenter="0" verticalCenter="0"> | |
</mx:Label> | |
<mx:Script> | |
<![CDATA[ | |
private function minimizeToDock():void{ | |
nativeWindow.addEventListener(Event.CLOSING, function(event:Event):void{ | |
event.stopImmediatePropagation(); | |
event.preventDefault(); | |
nativeWindow.visible = false; | |
nativeApplication.addEventListener(InvokeEvent.INVOKE, function(event:InvokeEvent):void{ | |
trace(" Invoking..."); | |
nativeWindow.visible = true; | |
}); | |
}); | |
} | |
]]> | |
</mx:Script> | |
</mx:WindowedApplication> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment