2

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

mgraph
  • 15,238
  • 4
  • 41
  • 75
eomer
  • 3,514
  • 7
  • 30
  • 42
  • do you want to run this locally from a computer or on a server on the web ? – George Profenza Jun 29 '12 at 09:40
  • I want it locally but not just my computer any computer locally – eomer Jun 29 '12 at 11:42
  • Security.loadPolicyFile should refer to a full absolute web location. The idea is its asking your server for permission to start digging around and pulling down assets. Making the policy file reference relative serves no purpose since you likely have full permission over whichever computer you are running the SWF on... – 1owk3y Jul 17 '17 at 06:05

2 Answers2

2

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.

George Profenza
  • 50,687
  • 19
  • 144
  • 218
-1

Have you considered wrapping your application as air

Eran
  • 1,628
  • 16
  • 31