Issue:
- Unable to load variables or XML data into a Flash movie from another domain/subdomain.
- Unable to load swf or flv into Flash movie from another domain/subdomain.
Reason:
For security reasons, data loading operations (load, loadMovie, loadVariables, & etc.) from a different domain is not permitted.
Solution:
Create a cross-domain policy file (crossdomain.xml) and place on the site root of the server you wish to access with the movie.
Cross-domain policy files is a simple XML file that gives the Flash Player permission to access data from a given domain without displaying a security dialog, the file can be created in a simple text editor such as Notepad or SimpleText.
- Sample Cross-domain policy file allow access from any domain
<?xml version="1.0"?> <cross-domain-policy> <allow-access-from domain="*" /> </cross-domain-policy>
- Sample Cross-domain policy file allow access from any subdomains & local server, & secure server
<?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="www.ggshow.com" /> <allow-access-from domain="ggshow.com" /> <allow-access-from domain="*.ggshow.com" /> <allow-access-from domain="blog.ggshow.com" /> <allow-access-from domain="search.ggshow.com" /> <allow-access-from domain="blog" /> <allow-access-from domain="search" /> <allow-access-from domain="www.ggshow.com" secure="false" /> </cross-domain-policy>
- Sample Cross-domain policy file on other websites
- http://www.google.com/crossdomain.xml
- http://www.yahoo.com/crossdomain.xml
- http://www.bing.com/crossdomain.xml
- http://www.youtube.com/crossdomain.xml
- http://www.facebook.com/crossdomain.xml
- http://www.amazon.com/crossdomain.xml
- http://www.flickr.com/crossdomain.xml
- http://www.twitter.com/crossdomain.xml
Additional Information:
crossdomainxml.org
LiveDocs:
Using policy files
TechNote:
External data not accessible outside a Macromedia Flash movie’s domain
Loading data across domains
Macromedia Flash movie fails to load data in Flash Player 7