I have a mini-Air app I make available for AUG members to install on
their Desktop to get latest site content via SCAUG onAIR here
http://www.spacecityaug.com 

I don't really like for them to have to download AIR exe and .air
separately and it opens the door to support issues.:)

I'd like to have one button within my flex app that they click on to
seamlessly install it from the web.

I've read some of the docs about badge, etc. But it isn't very clear
to me how to do it from within Flex, not html. Seems overly
complicated. Seems like I should be able drop in some AS and with a
click event to make it happen. 

These seem to be close to what I need...
http://livedocs.adobe.com/air/1/devappshtml/distributing_apps_3.html#1037783
http://livedocs.adobe.com/air/1/devappshtml/distributing_apps_3.html#1035833

But, it is a little fragmented for me to pull it together.

Would I do something like this code below?

Thanks,
Don

public function installLaunchPadbuttonClick():void 
{
var airSWF:Object;
var airSWFLoader:Loader = new Loader();
var loaderContext:LoaderContext = new LoaderContext();
loaderContext.applicationDomain = ApplicationDomain.currentDomain;
airSWFLoader.load(new
URLRequest("http://airdownload.adobe.com/browserapi/air.swf";), 
                    loaderContext);

var url:String = "http://www.spacecityaug.com/launchPad.air";;
var runtimeVersion:String = "1.0.M6";
var arguments:Array = ["launchFromBrowser"]; // Optional
airSWF.installApplication(url, runtimeVersion, arguments);

}




Reply via email to