开发者

Any examples for such an AIR application

开发者 https://www.devze.com 2023-03-05 11:03 出处:网络
I\'m looking for an example of an AIR a开发者_Go百科pplication, that all it does it loads Firefox. Can someone point me to an example that can be modified to do this, or that does this exactly?<?xm

I'm looking for an example of an AIR a开发者_Go百科pplication, that all it does it loads Firefox. Can someone point me to an example that can be modified to do this, or that does this exactly?


<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script><![CDATA[
import flash.net.URLRequest;

public function clickButton():void{
var request : URLRequest = new URLRequest('C:\\path to mozilla\firefox.exe');
navigateToURL(request )    
}
]]></mx:Script>

<mx:Button click="clickButton()" label="Launch Firefox"/>
</mx:WindowedApplication>

if not sure about location or on mac use properties like this to get to default folders..

var appDir:File    = File.applicationDirectory;
var appStoreDir:File= File.applicationStorageDirectory;
var desktopDir:File = File.desktopDirectory;
var docDir:File    = File.documentsDirectory;
var userDir:File    = File.userDirectory;
var rootDirArr:Array = File.getRootDirectories();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号