开发者

How to install an AIR app from an intranet?

The Adobe AIR documents tell me (I can't find the exact page again!) that I can download the air.swf that you normally call from http://airdownload.adobe.com/air/browserapi/air.swf. I have done this and load it in my own 'badger' script.

Base reference: http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.html

After loading, the first call to air.getStatus() works and I see a correct "installed" or "available" based on whether my non-internet connected client has AIR or not. I can also run air.installApplication() and air.launchApplication(). But whenever I run air.getApplicationVersion() the callback function always receives "null". The moment that I load 开发者_如何学Cthe air.swf from adobe.com everything is perfect so I think the code is fine.

I suppose it must be something to do with the fact that this function is using a callback wheras the others don't.

My purpose with this is to be able to install and/or run an AIR application for non-internet connected computers. Does anyone have any advice?

Thanks Adrian


Go in to your [yourproject]-app.xml file (typically located in the /src folder of the project), and look for the 'allowBrowserInvocation' tag.

It will be commented out, like this:

<!-- <allowBrowserInvocation></allowBrowserInvocation> -->

Change that line to read:

<allowBrowserInvocation>true</allowBrowserInvocation>

And your return value in the callback function from your call to getApplicationVersion() will no longer always be null.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜