3 Replies Latest reply on Jun 7, 2006 9:17 AM by Newsgroup_User

    Pathing issues (Really need help here!!)

    herchmer
      I have a web page containing a section that parses in some XML information. The SWFs are located one level outside of the XML:

      html / all_swf_files_and_html_index

      The XML is located here
      html / transactions / xml_file

      When I test this locally everything works. I use this path
      var newXML:BuildXML = new BuildXML(" http://thesite.com/transactions/xml.php", myMC);

      When i publish the swfs to the server, it doesn't work. I use this path
      var newXML:BuildXML = new BuildXML("transactions/xml.php", myMC);


      I am BEGGING someone to help me on this. I am a little out of my programming league and I have an angry client on my hands.
        • 1. Re: Pathing issues (Really need help here!!)
          DazFaz Level 1
          For what its worth you might trying to put the absolute path into the URL address and not as you have it now, relative. The atleast you know you are getting the file hook or by crook.
          • 2. Re: Pathing issues (Really need help here!!)
            Level 7
            How about this?

            var newXML:BuildXML = new BuildXML("../transactions/xml.php", myMC);


            "herchmer" <webforumsuser@macromedia.com> wrote in message
            news:e66qfr$jhr$1@forums.macromedia.com...
            > I have a web page containing a section that parses in some XML
            information. The
            > SWFs are located one level outside of the XML:
            >
            > html / all_swf_files_and_html_index
            >
            > The XML is located here
            > html / transactions / xml_file
            >
            > When I test this locally everything works. I use this path
            > var newXML:BuildXML = new BuildXML("<a target=_blank
            > class=ftalternatingbarlinklarge
            >
            href=" http://thesite.com/transactions/xml.php",">http://thesite.com/transact
            ions
            > /xml.php",</a> myMC);
            >
            > When i publish the swfs to the server, it doesn't work. I use this path
            > var newXML:BuildXML = new BuildXML("transactions/xml.php", myMC);
            >
            >
            > I am BEGGING someone to help me on this. I am a little out of my
            programming
            > league and I have an angry client on my hands.
            >
            >


            • 3. Re: Pathing issues (Really need help here!!)
              Level 7


              var xmlPath = _url.indexOf("file")==0 ?
              http://thesite.com/transactions/xml.php : "../transactions/xml.php";
              var newXML:BuildXML = new BuildXML(xmlPath , myMC);




              Or you could also use a query parameter when you load your swf.

              mymovie.swf?.MYXMLPATH=../

              You could then reference the value using:
              _level0.MYXMLPATH if it's the topmost movie
              _root.MYXMLPATH if you're loading into child movie clip and using _lockroot
              or myMovieClip.MYXMLPATH


              and then you could use it something like this:

              var myXmlPath = _level0.__XMLPATH==undefined ? http://thesite.com/ :
              _level0.__XMLPATH;
              var newXML:BuildXML = new BuildXML(myXmlPath+"transactions/xml.php", myMC);



              "herchmer" <webforumsuser@macromedia.com> wrote in message
              news:e66qfr$jhr$1@forums.macromedia.com...
              > I have a web page containing a section that parses in some XML
              information. The
              > SWFs are located one level outside of the XML:
              >
              > html / all_swf_files_and_html_index
              >
              > The XML is located here
              > html / transactions / xml_file
              >
              > When I test this locally everything works. I use this path
              > var newXML:BuildXML = new BuildXML("<a target=_blank
              > class=ftalternatingbarlinklarge
              >
              href=" http://thesite.com/transactions/xml.php",">http://thesite.com/transact
              ions
              > /xml.php",</a> myMC);
              >
              > When i publish the swfs to the server, it doesn't work. I use this path
              > var newXML:BuildXML = new BuildXML("transactions/xml.php", myMC);
              >
              >
              > I am BEGGING someone to help me on this. I am a little out of my
              programming
              > league and I have an angry client on my hands.
              >
              >