-use-network


工程刚刚加载就发现报错信息:Main.swf 不能访问本地资源 data/data3.xml。只有仅限于文件系统的 SWF 文件和可信的本地 SWF 文件可以访问本地资源。" faultCode="InvokeFailed" faultDetail="null"]


google一下: 在工程属性 Additional compiler arguments 加入 -use-network=false   


关于use-network=true|false的解释

Specifies that the current application uses network services.
The default value is true.
When the use-network property is set to false, the application can access the local filesystem (for example, use the XML.load() method with file: URLs) but not network services. In most circumstances, the value of this property should be true.

For more information about the use-network property, see Applying Flex Security.

 

另外网上一篇博客说:

将flex项目中的bin-debug文件夹移动到其它地方运行swf的时候无法加载本地文件,提示仅限于文件系统的 SWF 文件和仅限于网络的 SWF 文件不能彼此加载?的解决办法

在project-properties-flex compiler-添加命令参数:-use-network=false
就可以正常加载了。
然后将编译好的swf文件拷贝到其他目录也能直接用Flash Player正常打开,但是不能在网络上访问。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值