2 Replies Latest reply on Dec 5, 2007 2:02 AM by yachts99-2vTvY1

    Pulling values from XML into Flash

    sculptor85
      hello everyone. Thanks in advance for your help!

      I'm trying to get XML working on my FLASH project here. I have to following actionscript working on a plain single layer flash file (AS 2.0).

      var myXML:XML = new XML();
      myXML.ignoreWhite=true;
      myXML.onLoad = function(success) {
      if(success) {
      semTXT = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
      semBox.text = semTXT;
      }
      }
      myXML.load("test.xml");

      and I have the following XML format:

      <?xml>
      <messages>
      <message>
      <region>Place 1</region>
      <sem>Person 1</sem>
      <location>Place 2</location>
      <se>Person 2</se>
      </message>
      </messages>


      However, I'm getting a message "undefined" when I test the file. Can anyone let me know if I'm doing something wrong? The actionscript is on the Text and I have the following XML format: