2 Replies Latest reply on Jul 20, 2006 10:41 AM by Rothrock

    Flash loads XML only when movie is not viewed via browser

    MikeD.
      I have a game that I wrote a while back that is no longer functioning when it is played in Internet Explorer. However, it still works fine if it is run directly in Flash player.

      The game loads data from an XML file, and it appears for some reason that flash can't load the XML file when in a browser. I thought it might be the issue with MSIE and ActiveX control (ie, "click to activate this control"), but I applied a fix for that (an external .js file that does document.writes to load the control) and it didn't change anything.

      I can't point to the game since it's part of an internal training course. I can post the code that loads the XML and creates an array from the data.

      I've tried various IE security settings as well, although our PC's are locked down extremely tightly so there isn't much I can change..

      Anyone have any thoughts??
        • 1. Re: Flash loads XML only when movie is not viewed via browser
          Level 7
          Hmm. It's not the fact that it's in a browser, that much I know. I actually
          just completed a little xml based slideshow viewer yesterday, and it works
          fine in both IE and FireFox. Your code looks ok... so I'm not sure what to
          tell you. The IE eolas thing is not relevant anyway, since the Flash movie
          will still load the xml and files, regardless if the movie has been
          "activated" by clicking on it.

          Have you verified your fillArray() function gets called? Remember too, that
          getting the nodeValue of your node might not be what you expect - you get a
          _node_ value - not a string or a number as you might wish. Do a parseInt()
          or toString() on the data... I know I've had that issue before when working
          with XML...


          --
          Dave -
          Adobe Community Expert
          www.blurredistinction.com
          http://www.adobe.com/communities/experts/


          • 2. Re: Flash loads XML only when movie is not viewed via browser
            Rothrock Level 5
            When played in a browser the path the XML file will be relative to the HTMl, not the swf. When you play it in the player it is relative to the swf.

            If they are all in the same folder this won't be a problem. Otherwise that could be it?

            Other than that I don't know since I've never had a problem with XML in the browser either.