Flash: Setting up the Cross domain XML policy file

One of the annoying "features" of security is that you constantly have to keep working around it, legitimately.

In order for your flash file to access data on other servers, you have to set up a crossdomain.xml file in the root of your domain.

For example, this is at http://somehost.com/crossdomain.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*.yourhost.com.au"/>
</cross-domain-policy>

Replacing "yourhost.com.au" with whatever remote server you wish to access.

You can also have multiple "allow-access-from" elements to allow multiple domains. For more information see source.

Hope you didn't spend too long looking for the answer to this one!

Source

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog