Any examples for such an AIR application
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();
精彩评论