加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

SecurityError: Error #2148: SWF 文件 (SWF 文件不能访问本地资

发布时间:2020-12-15 18:39:55 所属栏目:百科 来源:网络整理
导读:SWF 文件不能被本地访问 不能访问本地 只有仅限于文件系统的 SWF 文件和可信的本地 SWF 文件可以访问本地资源 错误信息:SecurityError: Error #2148: SWF 文件 D:demotestindex.swf 不能访问本地资源 D:demotestbin-debugtextLayout_4.0.0.10485.swf

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


错误信息:SecurityError: Error #2148: SWF 文件 D:demotestindex.swf 不能访问本地资源 D:demotestbin-debugtextLayout_4.0.0.10485.swf。只有仅限于文件系统的 SWF 文件和可信的本地 SWF 文件可以访问本地资源。
at flash.net::URLStream/load()
at flash.net::URLLoader/load()

解决方法 :
在C:WINDOWSsystem32MacromedFlashFlashPlayerTrust目录下添加一个文件,比如:myTrustFiles.txt(文件名可任意起),文件内容为:“D:demotest”即项目的路径,当然也可以设置为“D:”

或者所以盘符都写上:

c:
d:
e:
f:


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

说明:

为了让你的Flash在用户硬盘中拥有同时访问网络和本地的能力,你必须在用户计算机的FlashPlayerTrust目录中为你的Flash添加权限.

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

Windows 所有用户:

<系统 ? MacromedFlashFlashPlayerTrust


(例如 c:WINNTsystem32MacromedFlashFlashPlayerTrust )

Windows 单个用户:

<应用程序数据 ? MacromediaFlash Player#SecurityFlashPlayerTrust

(例如 c:Documents and SettingsfredApplication DataMacromediaFlash Player#SecurityFlashPlayerTrust )

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 <user> with actual username):
/home/<user>/.macromedia/Flash_Player/#Security/FlashPlayerTrust
For all users on the machine:
/etc/adobe/FlashPlayerTrust/
根据自己操作系统级别设置Flash权限即可解决。


第二种:

flex项目上点右键-->properties-->ActionscriptCompiler-->Additional compiler arguments
加上 “ -use-network=false ” 就OK了

swf就无法访问网络资源了,比如socket通讯之类的.

所以最好不要这样用。


原文地址:http://www.cnzixue.com/html/sort/media/2010/1111/7497.html

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读