Flash Builder 4.6 未针对 Flash Player 10.2 进行编译 [英] Flash Builder 4.6 not compiling for Flash Player 10.2

查看:37
本文介绍了Flash Builder 4.6 未针对 Flash Player 10.2 进行编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是创建 Flex 应用程序的新手,并尝试将我的第一个应用程序定位到 Flash Player 10.2.我使用 Flash Builder 4.6 创建它并使用 4.5a SDK 编译.我还在 Adob​​e Flash Player 选项中设置了针对 10.2.0 的选项.当我创建发布版本时,没有错误,生成的 HTML 文件包含以下内容:

I am new to creating Flex applications and trying to target Flash Player 10.2 with my first. I have created it using Flash Builder 4.6 and compiled using the 4.5a SDK. I've also set the option to target 10.2.0 in the the Adobe Flash Player options. When I create the release build, there are no error and the resulting HTML file contains the following:

// For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
var swfVersionStr = "10.2.0";

但是,如果我尝试在带有 v10.2 插件的浏览器中访问该应用程序,它会显示需要 11.1.我的一个简单的 Flash CS5 动画也有同样的问题,它只使用 stop() 和 getURL().动画有效但不会停止.

However, if I try to visit the application in a browser with v10.2 of the plug-in it says 11.1 is needed. I also have the same problem with a simple Flash CS5 animation that only uses stop() and getURL(). The animation works but doesn't stop.

感谢 wxvxw 的详细回复 我现在已经截取了我的编译器选项的屏幕截图,但由于我是新用户,无法在此处显示,但 URL 是...

Thanks for the detailed reply wxvxw I've now taken a screenshot of my compiler options, but can't show it here as I'm a new user, but the URL is...

https://lh6.googleusercontent.com/-3xEJ0RTFG-8/Tw9rJt2UloI/AAAAAAAAARs/Ruu9Em66fgo/s800/fboptions.PNG

我已经尝试过 -target-player 10.2.0(以前)和现在 -target-player 10.2 但都没有奏效.我还在以下目录中找到了 playerglobal.swc:C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.5.0\frameworks\libs\player\10.2

I've tried -target-player 10.2.0 (previously) and now -target-player 10.2 but neither worked. I've also located the playerglobal.swc in the following directory: C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.5.0\frameworks\libs\player\10.2

谢谢.丹.

推荐答案

IIRC,FB 4.6 自带的 SDK 只有 FP 10.1 和 FP 10.3 库.因此,为了针对 FP 10.2 进行编译,您必须找到相应的 playerglobal.swc(可能会查找较旧的 SDK 版本?).

IIRC, the SDK that comes with FB 4.6 only has FP 10.1 and FP 10.3 libraries. So, in order to compile for FP 10.2 you will have to find the corresponding playerglobal.swc (maybe look up older SDK releases?).

现在,关于您的设置:您要编译的播放器版本是在编译器参数中设置的,有多种方法可以做到这一点,但看起来您已经做了其他事情:) 为了为某个播放器版本编译,编译器需要知道那个版本的播放器是如何运行的,也就是说,它需要描述播放器当时拥有的所有内置函数.playerglobal.swc 提供了这些函数的定义(在您的 SDK 文件夹中搜索可能的位置).-target-player 是您需要的编译器参数.告诉编译器目标播放器的一种方法是打开项目设置,并在附加编译器参数行中键入类似 -target-player 10.2 的内容.请注意,您可能没有合适的 playerglobal.swc.这种情况下的编译器错误将大致指向要找到该库的目录.

Now, regarding your settings: the version of the player you want to compile for is set in the compiler arguments, there are multiple ways to do that, but it looks like you've done something else instead :) In order to compile for certain player version, the compiler needs to know how that version of the player behaved, that is it needs a description of all the built-in functions the player had at that time. playerglobal.swc provides the definitions for those functions (search your SDK folder for the possible location). -target-player is the compiler argument that you need. One way to tell the compiler what player to target is to open the project settings and in the additional compiler arguments line type something like -target-player 10.2. Note that you might not have the appropriate playerglobal.swc. The compiler error in such case will roughly point you to the directory where this library is to be found.

Flash Builder 和 SDK 从来没有 11+ 播放器作为要求,(而且,SDK 甚至没有针对这个版本进行过测试),所以这个要求是不相关的(你是否使用谷歌浏览器进行测试,也许你需要检查 about:plugins 页面?).您所做的是一些变量,它应该告诉用于嵌入 SWF 的 JavaScript 脚本,运行 SWF 所需的播放器的最低版本,这对 SWF 本身没有影响,仅用于用户信息(你应该这样设置,如果用户有旧版本的播放器,他们会被告知升级).如果您使用 FB 的代码生成,或 Adob​​e 提供的 Ant 任务来生成包含 SWF 的 HTML 页面,那么此变量将设置为您用于编译 SWF 的相同版本,否则由您将其调整为适当的价值.

Flash Builder and SDK had never had 11+ player as a requirement, (more yet, the SDK has not even been tested against this version), so the requirement is unrelated (did you use Google Chrome for testing, maybe you need to check about:plugins page?). What you did set is some variable that is supposed to tell the JavaScript script that is used to embed the SWF, what minimum version of the player is required to run the SWF, this has no effect on the SWF itself, it's only for user's information (you should set it in such a way, that in case users have older version of player they will be told to upgrade). If you used FB's code generation, or the Ant task provided by Adobe to generate the HTML page containing SWF, then this variable would be set to the same version you used to compile your SWF to, otherwise it's up to you to adjust it to the proper value.

这篇关于Flash Builder 4.6 未针对 Flash Player 10.2 进行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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