5 Replies Latest reply on Apr 19, 2006 7:07 AM by Peter Lorent

    "XMLConnector.URL = variable" problem

      Okay here is the deal.


      Using Flash 8 with XMLConnector, DataSet and DataGrid components.

      XMLConnector with instancename: myXMLConnector

      I want to let the URL for the XML file be defined in an external text file system.txt
      The textfile looks like this: &xml_location=C:/www/stat.xml

      Then I added this code to the 1st frame timeline of the XMLConnector
      loadVariables("system.txt", "_root");
      myXMLConnector.URL = xml_location;

      But it doesn't work, I get an "undefined" error when I try to execute the movie...
      Can anyone tell my why this doesn't work? Why doesn't the XMLConnector detect the variable propperly?

      Setting the XML path directly (without the external variable textfile) works fine:
      myXMLConnector.URL = "C:/www/stat.xml";
      But that isn't good enough, I specifically need the XMLConnector to get the URL from an external file.

      I have used a very similar technique to define button onRelease URLs externally (also in the system.txt file) and that worked out great... but this doesn't :wacko:, I've searched with google for hours and can't find a real solution, or atleast a hint of what I'm doing wrong.

      Thx in advance.

      p.s. I have already tested the system.txt file by making a dynamic textfield in the scene and letting it get the body from a variable in the system.txt. I worked like a charm... but the XMLConnecter just won't work