views:

206

answers:

2

Wondering if I need to do something in my swf to be able to access the assets on a different server, meaning more than just specify the url to the asset. Will flash handle the 'go get crossdomain.xml and authenticate everything' behind the scenes or do I need to include some special code beyond simply requesting the swf file?

A: 

If you're just trying to access another swf, adding the crossdomain.xml will do all the work for you since Flash will do it for you

Steve Wright
+1  A: 

Will flash handle the 'go get crossdomain.xml and authenticate everything' behind the scenes or do I need to include some special code beyond simply requesting the swf file?

In the event of any cross-domain request, Flash will look for the crossdomain.xml file at the root of the domain. For example, if you are requesting an XML file from: http://mysubdomain.mydomain.com/fu/bar/

Flash will check if a crossdomain.xml file exist at: http://mysubdomin.mydomain.com/crossdomain.xml

If you ever need to load a crossdomain.xml file from a different location, you can do it via Security.loadPolicyFile . Bear in mind that the location of this crossdomain have any impact on the security access you have.

You may also want to read up on the security changes in Flash Player 10.

Ronnie Liew