AS3.0 解决方案)SWF 文件不能本地访问 只有仅限于文件系统的 SWF 文件

AS3.0 解决方案)SWF 文件不能本地访问 只有仅限于文件系统的 SWF 文件 

 

SWF 文件不能被本地访问 不能访问本地 只有仅限于文件系统的 SWF 文件和可信的本地 SWF 文件可以访问本地资源

 

 

错误信息:SecurityError: Error #2148: SWF 文件 D:\demo\test\index.swf 不能访问本地资源 D:\demo\test\bin-debug\textLayout_4.0.0.10485.swf。只有仅限于文件系统的 SWF 文件和可信的本地 SWF 文件可以访问本地资源。

at flash.net::URLStream/load()

at flash.net::URLLoader/load()

 

解决方法:

C:\WINDOWS\system32\Macromed\Flash\FlashPlayerTrust目录下添加一个文件,比如:myTrustFiles.txt(文件名可任意起),文件内容为:"D:\demo\test\"即项目的路径,当然也可以设置为"D:\"

 

或者所以盘符都写上:

 

c:\ 

d:\ 

e:\ 

f:\

 

 

===========================

 

说明:

 

为了让你的Flash在用户硬盘中拥有同时访问网络和本地的能力,你必须在用户计算机的FlashPlayerTrust目录中为你的Flash添加权限。转载请注明出处:hi.baidu.com/taotao5453

 

FlashPlayerTrust 配置文件。这些是列出受信任路径的简单文本文件。这些文件由可执行的安装程序创建。当安装程序将 SWF 安装到用户的计算机时, 它能够安装信任的配置文件并指定 SWF 是受信任的。当该做法没有表现用户显式决定每个受信任的 SWF , 该用户已通过运行安装程序将信任隐式给予它, 毕竟它是可执行程序。Flash Player 可识别以下两个位置的信任配置文件: 影响计算机所有用户的位置和只影响当前用户的位置。所有用户位置需要操作系统级别的管理权限。这些位置如下:

 

Windows 所有用户

 

<系统 ? \Macromed\Flash\FlashPlayerTrust

 

 

(例如 c:\WINNT\system32\Macromed\Flash\FlashPlayerTrust)

 

Windows 单个用户

 

<应用程序数据 ? \Macromedia\Flash Player\#Security\FlashPlayerTrust

 

(例如 c:\Documents and Settings\fred\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust)

 

Mac OS 所有用户

 

<应用程序支持 ? /Macromedia/FlashPlayerTrust 

 

(例如 /Library/Application Support/Macromedia/FlashPlayerTrust)

 

Mac OS 单个用户

 

<应用程序数据 ? /Macromedia/Flash Player/#Security/FlashPlayerTrust 

 

(例如 /Users/fred/Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust)

 

-Lunix 用户

 

For single-user (replace with actual username):

/home//.macromedia/Flash_Player/#Security/FlashPlayerTrust 

For all users on the machine:

/etc/adobe/FlashPlayerTrust/

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值