Flex的getApplicationVersion()始终返回null版本 [英] Flex getApplicationVersion() always returns null version

查看:209
本文介绍了Flex的getApplicationVersion()始终返回null版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前工作的一个Flash应用程序,有一个兄弟空气等效。从Flash应用程序内,我想安装同级AIR应用程序。 Adobe已提供的air.swf(它也用于在徽章样品中)以帮助我们进行安装。我已经成功地模仿徽章应用程序的行为,但getApplicationVersion总是返回null。请注意,我没有publisherId。

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.

下面是由Adobe提供的文档:安装和运行从网页的AIR应用程序

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

AIR应用程序的XML:

Air application XML:

...

< id >MyAirApplication< /id >

...

现在,我试图找出应用程序的版本使用下列内容:

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


public function DoAction(event:MouseEvent):void 
{
   try {
      m_airSwf.getApplicationVersion( "MyAirApplication", "", CheckVersion_);
   }
   catch(e:Error) { ... }
}

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

现在的CheckVersion_函数被调用,并传入的版本总是空。我检查的日志我发现这个条目:

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]命令行是:   -playerVersion = 10,1,53,64 -sandboxType =远程-securityDomain = airdownload.adobe.com -https =假-fromUserEvent =真 - -launch MyAirApplication

[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

我清楚地失去了一些东西。我的行为似乎pretty的直线前进,我似乎无法针点为什么它没有找到我的应用程序。有没有人有什么想法?哦,我还测试了在Windows 7 64位和Windows XP(测试权限)。

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).

推荐答案

我已经找到了我的问题。这是不是很清楚,但为了推出或查询您需要在您的application.xml以下AIR应用程序

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>

这篇关于Flex的getApplicationVersion()始终返回null版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆