1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="goToUrl()" width="1024" height="768" >
<fx:Script>
<![CDATA[
private var myUrl:String = "http://localhost/monAppli/monAppli.html";
private var icon:Loader = new Loader();
private function goToUrl():void {
if (NativeApplication.supportsSystemTrayIcon) {
icon.load(new URLRequest("assets/AppIcon16.png"));
}
if (NativeApplication.supportsDockIcon){
icon.load(new URLRequest("assets/AppIcon128.png"));
}
if (myUrl.substr(0,4) != "http") {
myUrl = "http://" + myUrl;
}
browser.location = myUrl;
//navigateToURL(new URLRequest(myUrl), "_self")
}
]]>
</fx:Script>
<mx:HTML id="browser" height="100%" width="100%" />
</s:WindowedApplication> |
Partager