flash SecurityError: 错误 #2028: 本地文件系统 SWF 文件 [英] flash SecurityError: Error #2028: Local-with-filesystem SWF file
问题描述
我的 Flash 应用程序在尝试与互联网通信时出现错误 2028与 flash ide 一起工作正常.但是当我用 Flash Player 运行 swf 文件时首先,我收到有关不安全操作的警告,然后我继续并收到 SecurityError: Error #2028: Local-with-filesystem SWF file file:///C|/Users.... 错误
hi my flash app is getting error 2028 when trying to communicate with the internet works fine with flash ide. but when I run swf file with flash player first i get a warning about unsafe operation then I continue and get SecurityError: Error #2028: Local-with-filesystem SWF file file:///C|/Users.... Error
我知道如何在本地解决这个问题,但我需要它在任何地方都能工作,而不仅仅是在我的本地我不会将我的 swf 上传到任何服务器,我只想将其复制到闪存驱动器中并在我想要的任何地方工作
I know how to solve this in local but I need it to work everywhere not just in my local I will not upload my swf to any server I just want it to copy it in a flash drive and work anywhere I want
我将 crossdomain.xml 与 swf 放在相同的目录中并添加了这两行:(也导入了)
I put crossdomain.xml same dir with the swf and added these 2 lines:(also imported)
Security.allowDomain("*");
Security.loadPolicyFile("crossdomain.xml");
但没有任何变化
我的 crossdomain.xml:
my crossdomain.xml:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
请帮忙
推荐答案
如果您使用 Flash 编译,请尝试在 Flash(.swf) 发布设置:
If you're compiling with Flash try to set the Local playback security to Access local files only in the Flash(.swf) Publish Settings:
如果您使用 FlexSDK(有或没有任何 IDE),您需要将 -use-network
编译器标志设置为 false
:
If you're using the FlexSDK (with or without any IDE), you need to set the -use-network
compiler flag to false
:
-use-network=false
您可以阅读有关不同安全沙箱的更多信息here一>.
You can read more about the different security sandboxes here.
这篇关于flash SecurityError: 错误 #2028: 本地文件系统 SWF 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!