闪存引发SecurityError:错误#2028:与本地文件系统的SWF文件闪存、错误、本地文件、文件

2023-09-08 12:20:07 作者:曲終人也散

大家好,我的Flash应用程序正在尝试与互联网进行交流的时候收到错误2028 正常工作与闪光灯的IDE。但是当我运行的Flash Player的SWF文件 首先,我收到了关于不安全的操作警告,然后我继续,并得到引发SecurityError:错误#2028:与本地文件系统的SWF文件的文件:/// C | /用户....错误

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尝试设置本地回放安全性,以在闪存仅访问本地文件(瑞士法郎)发布设置

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),您需要设置 - 使用网络编译器标志

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

您可以阅读更多关于不同的安全沙箱中的这里。

You can read more about the different security sandboxes here.