Skip to main content
Participant
April 10, 2009
Question

Cross Domain XML not working

  • April 10, 2009
  • 1 reply
  • 3673 views

Greetings,

I recently obtained two different domains that point to a subdirectory of another domain server. The swf file I created does not show up when I use the domains that are pointing to the subdirectory of the original domain.

I placed an xml file into the root directory that contains the following code:

<?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="*.newdomainname1.com"/>
    <allow-access-from domain="*.newdomainame2.com"/>
</cross-domain-policy>

Nothing shows up. Is there something else I need to do make this work? I created the swf file using CS3 - Action Script 2. I tried searching everywhere to see if I'm missing a step, but cannot find anything. Any help would be greatly appreciated.

This topic has been closed for replies.

1 reply

Inspiring
April 11, 2009

The description of your problem is not clear (at least not to me anyway). If you are using redirects for example for data loading requests, there can be some issues.

You can get most of the clues to a cross-domain problem by using firebug with firefox and checking the http request/responses. You can see the flash player asking for a cross-domain permission and whether it failed or not.

If that is not helpful to you , post the link showing the problem and I (or someone else if they get there first) can check it for you.

bbabylonAuthor
Participant
April 13, 2009

Thanks for the reference, I installed Firebug. When I take a look at the section that contains the swf file, there's no indications of any type of error or requests. My cross domain file is named crossdomain.xml and it's placed within the main directory of the website.

The swf file does show up with the direct url address: www.searecovery.com/commercial/dsrc_dealers/dsrc_dealers.html

(top interactive map)

but it doesn't show up with the new domains that point to this directory:

www.danfosssearecovery.com/dsrc_dealers/dsrc_dealers.html

www.danfoss-searecovery.com/dsrc_dealers/dsrc_dealers.html

Inspiring
April 13, 2009

I'm still not entirely clear what the problem is.

Those links to the other domain show 404 errors, which is related to how things are set up on your hosting server for those domains, and nothing to do with flash.

Are you trying to get the swf at http://www.searecovery.com/ to load data from the other domains? (I can't see it trying to do that, so perhaps not)

If so you need to add *.searecovery.com to the crossdomain files at the other domains.

Crossdomain files give flash content (swfs) hosted at one domain access to load data (or grant access to the data of loaded assets) from another domain.

So you need crossdomain permission if you want a swf hosted at www.danfoss-searecovery.com to load xml data from www.danfosssearecovery.com for example, or to get at the bitmapdata of jpgs loaded from www.danfosssearecovery.com.

If you just want to host the swf at the other domain, and if it's not loading data from external domains, then you pretty much just need to move copies of the html and swf there along with any external assets it loads (so long as you have used relative urls for loaded assets from within the swf) . If that's what you're trying to do then the issue here is likely to be simply how your hosting environment is set up for the other domains.