PDA

View Full Version : swf cross domain security


Cónal
04-12-2007, 12:00 AM
I am trying to load a swf file from my website from a local flash file. Ikeep getting the error message:

Remote SWFs may not access local files.

I have added this AS to the child swf on my site:

System.security.allowDomain(_parent._url);

And I have added the the follwing to the local swf:

System.security.allowDomain("www.mydomain.com");

However, the error message persists. Any ideas?

Very grateful


icktoofay
04-12-2007, 05:40 AM
The "crossdomain.xml" file might help.

Cónal
04-13-2007, 10:36 PM
Thanls for the suggestion, but no luck - prpblem persists.

Put following in an crossdomain.xml file in root of domain I am trying to load the swf file from:

<?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>

senocular
04-13-2007, 10:45 PM
If you are running the file locally, you can access either local files *or* remote files (which is specified in the publish settings) unless you are running from a trusted folder. Trusted folders are specified in the global security settings app ( http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html ) or a cfg file in your app data directory for the flash player.