更新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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值