views:

574

answers:

2

Having some issues loading files from media hosting into swf shell (a swf loading swfs as assets). Mp3s and images work fine but a swf never loads. Code is like:

swfpath = "http://555.55.555.555/vir_dir/swf/N000001.swf" movie_loader.loadMovie(swfpath, "mc_swfimage");

if the swfpath is set to "swf/N00001.swf" it loads fine and if I point firefox towards the http link above (555s as placeholders here) it opens the file in firefox just fine.

Is it some security or does loadMovie not handle http paths?

Note it works fine if I do loadAudio with the same thing pointing to an MP3.

A: 

You need to have a crossdomain.xml file set up on the server serving the loaded SWF.

Check out the first couple of links on google:

http://www.google.com/search?client=safari&rls=en-us&q=crossdomain.xml&ie=UTF-8&oe=UTF-8

mike

mikechambers
+1  A: 

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