0
votes

I have two Flash files: pre-loader and application.

Pre-loader: (D:\Projects\FlashApps\dd\edd.fla) is doing basically this:

var mRequest:URLRequest = new URLRequest("http://localhost/flash/dd.swf");
mLoader.load(mRequest);
}

Application file: (D:\Projects\FlashApps\dd\dd.fla) is the real application and among other things is doing this:

_loader.load(_request); //where _request = "assets/html/style.css". 

When debugging the pre-loader, at this point I am getting an error which says:

SecurityError: Error #2148 File SWF http://localhost/flash/dd.swf cannot access local resource file:///D|/Projects/FlashApps/dd/assets/html/style.css.

The application must be loaded by the pre-loader, it won't start when called directly. But apparently, the security settings are preventing such duo from being possible to debug. Normally when it is on a remote server, it is working ok.

What I have done so far to resolve it:

  1. Added crossdomain.xml to my local i:\xampp\htdocs folder:
>     <?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="localhost" />
>     </cross-domain-policy>
  1. Added folder D:\Projects\FlashApps to Global Security Settings panel here: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

  2. Set File > Publish Settings -> Local Playback Security -> "Use local files only" in both files. It didn't work, so I set it to "Use network only" Also didn't work.

What else can be done to be able to debug these Flash files locally?

1

1 Answers

0
votes

This is not a crossdomain-related problem. The player is trying to prevent you from accessing "malicious" content on the web or your file system, which it thinks you may be loading. In order to allow it to load things you need, you need to grant that SWF (usually done per folder, rather then per file) permissions to do it. It is easier to do it using the interface from here.

Note, that some times, if you have overlapping paths, the player may get stubborn about some particular directory. The solution in such case is to remove the directory which is nested deeper.