开发者

Flex getApplicationVersion() always returns null version

I'm currently working on a Flash application that has a sibling AIR equivalent. From inside the Flash application I would like to install the sibling AIR App. Adobe has provided an air.swf (which is also used in the Badge sample) to aid us with the install. I've managed to mimic the behavior of the Badge app but getApplicationVersion always returns null. Note that I do not have a publisherId.

Here's the documentation provided by Adobe: Installing and running an AIR applications from a web page

Air application XML:

...

< id >MyAirApplication< /id >

...

Now I'm trying to find out the application version using the following:


public function DoAction(event:MouseEvent):vo开发者_开发技巧id 
{
   try {
      m_airSwf.getApplicationVersion( "MyAirApplication", "", CheckVersion_);
   }
   catch(e:Error) { ... }
}

private function CheckVersion_(version : String):void
{
   Alert.show("Version: " + version); // Always returns null
}   

Now the CheckVersion_ function is called and the version that is passed in is always null. I've checked the log and I've found this entry:

[2011-02-08:09:29:14] Commandline is: -playerVersion=10,1,53,64 -sandboxType=remote -securityDomain=airdownload.adobe.com -https=false -fromUserEvent=true -- -launch MyAirApplication

I'm clearly missing something here. My actions seem pretty straight forward and I can't seem to pin point why it's not finding my application. Does anyone have any idea? Oh I've also tested on Windows 7 64bit, and Windows XP (to test permissions).


I've found out my issue. It wasn't quite clear but in order to launch OR query the AIR application you require the following in your application.xml

<allowBrowserInvocation>true</allowBrowserInvocation>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜