Wednesday, February 9, 2011

Flash: Send the POST value to another domain

Flash required a policy file to communicate between domains. For instance, if you have a file file loading content from another domain, called cross domain access, you might get this error.

Policy files must be named crossdomain.xml, and can reside either at the root directory or in another directory on the server that is serving the data with some additional ActionScript.

If you want to allow access to your server to all IPs and domain names just use a simple wild card as below:

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

Reference:
Transferring data across domains using crossdomain.xml
Flash cross domain access

No comments:

Post a Comment