Actionscript project Sandbox Error (Error #2044)
When you are working on an Actionscript project with a generated swf in Flex/Flash Builder you sometimes need to pass the work to someone else for review. If your swf is loading another swf you will not be able to get the files to work correctly. As soon as you copy the files to a local folder you are going to have problems because of the security in Flash player. If you run the html-file Flex/Flash Builder created you will get an error:
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2140: Security sandbox violation: file:///Users/mattiaswargren/Documents/Flex Builder 3/my-project/bin-release/Main.swf cannot load file:///Users/mattiaswargren/Documents/Flex Builder 3/my-project/bin-release/assets.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other.
This is just the temporary solution to get it working in a local folder:
- Right-click your project and select properties.
- Select Actionscript Compiler.
- Write -use-network=false in the textbox for Additional compiler parameters.

Next time you run this project it is ready for local use.
You could also add the folder containing your files in the Global Security Settings panel found here:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
Archives
Links

