Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
789 views
in Technique[技术] by (71.8m points)

actionscript 3 - flash SecurityError: Error #2028: Local-with-filesystem SWF file

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

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

I put crossdomain.xml same dir with the swf and added these 2 lines:(also imported)

Security.allowDomain("*");
Security.loadPolicyFile("crossdomain.xml");

but nothing changes

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>

please help

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you're compiling with Flash try to set the Local playback security to Access local files only in the Flash(.swf) Publish Settings:

access local files

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...