首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > flex >

更新flex sdk后,怎么在flex builder中设置以使用新的特性

2012-11-22 
更新flex sdk后,如何在flex builder中设置以使用新的特性正在做的项目需要将原来跑在浏览器上的flex项目转

更新flex sdk后,如何在flex builder中设置以使用新的特性

正在做的项目需要将原来跑在浏览器上的flex项目转到air环境中,由于项目使用到了flash 10的一些特性(比如p2p),在转到air环境中编译没有问题,运行时只要调用到flash 10特有的api,就老是出以下类似的错误:

?"ReferenceError: Error #1069: Property nearID not found on flash.net.NetConnection and there is no default value."

google baidu上都没有找到解决方案,最后在adobe的官方文档找到了线索,通过研究(曲折的过程省略),原来在更新了flex sdk后,需要在flex builder中手动设置才能真正使用新版本sdk中的特性(flex builder真是傻),需要修改以下文件:

?

1.The descriptor file, use xmlns="http://ns.adobe.com/air/application/1.5.3"

2.The .actionScriptProperties file in project path, use htmlPlayerVersion="10.0.0"

?

之所以需要这样修改参见:

http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7ff1.html

For SWF-based applications, the AIR runtime version specified in the application descriptor determines the maximum SWF version that can be loaded as the initial content of the application. Applications that specify AIR 1.0 or AIR 1.1 can only use SWF9 (Flash Player 9) files as initial content — even when run using the AIR 1.5 runtime. Applications that specify AIR 1.5, or higher, can use either SWF9 or SWF10 (Flash Player 10) files as initial content. The SWF version determines which version of the AIR and Flash Player APIs are available. If a SWF9 file is used as the initial content of an AIR 1.5 application, that application will only have access to the AIR 1.1 and Flash Player 9 APIs. Furthermore, behavior changes made to existing APIs in AIR 1.5 or Flash Player 10 will not be effective.

?

自己在stackoverflow上的提问:

http://stackoverflow.com/questions/2242331/can-adobe-air-application-use-p2p

?

热点排行