5 Replies Latest reply on Apr 13, 2009 3:22 PM by Greg Dove

    Cross Domain XML not working

      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.

        • 1. Re: Cross Domain XML not working
          Greg Dove Level 4

          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.

          • 2. Re: Cross Domain XML not working
            Level 1

            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

            • 3. Re: Cross Domain XML not working
              Greg Dove Level 4

              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.

              • 4. Re: Cross Domain XML not working
                Level 1

                Apparently my hosting service has been a little faulty, but all is resolved now.

                 

                When I re-pointed the domains to the subdirectory in which the swf files reside, Only one of the page links (http://www.danfosssearecovery.com/dsrc_dealers/dsrc_dealers.html) would show the swf file.

                 

                I checked the error log within firefox that said "AC_RunActiveContent not defined"

                 

                Turns out I had to go into my html file and place the right directory for the AC_RunActiveContent.js file. That solved my problem.

                 

                Thanks for the help. I appreciate it!

                • 5. Re: Cross Domain XML not working
                  Greg Dove Level 4

                  No problem, pleased you got it solved. Firefox/Firebug can be really helpful for things like that as well.