1 Reply Latest reply on Mar 27, 2007 5:32 AM by MotionMaker

    XML.Load

    soraya_soch
      Hi guys,
      I'm going crazy with the XML class for Flash 8.
      I'm new at Flash, so if it's obvious, I humbly apologize!

      I wrote a class which loads an xml file, and "tries" to parse it as an
      array. I have a local variable named text_array, and I attempt to feed
      it from within the onLoad event, dynamically.

      The object that is returned is undefined, and the trace is undefined
      as well. When I place a trace on the line
      text_array[count]=i.firstChild.nodeValue, I get the current value in
      the file.

      I don't get it. I don't see where I'm wrong... Help please....

      TIA,

      Soraya

        • 1. Re: XML.Load
          MotionMaker Level 1
          Most like the reference to the class instance is lost.

          You need to use the Delegate.create to define the call back to onLoad.

          I like to do that in the constructor.

          You probably also want the class to provide call backs to the code that will use the class.

          Here is a mock-up of the code you could consider