Link to home
Start Free TrialLog in
Avatar of frankybones
frankybones

asked on

URGENT! Not sure if I missed it or messed it--Flash text and XML

Okay I am loading different mc's out of the library and in those mc's are multiple dynamic textfields.  I figured that my AS should look something like this but it does not seem to work:

//load my XML
my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.load("Dtext.xml");
my_xml.onLoad = function(success) {
      if (success) {
            main2D.text = my_xml.firstChild.childNodes.childNodes[0].attributes.main2D;
            upgrade2D.text = my_xml.firstChild.childNodes[0].attributes.upgrade2D;
            full2D.text = my_xml.firstChild.childNodes[0].attributes.full2D;
            mus2D.text = my_xml.firstChild.childNodes[0].attributes.mus2D;
            feature2D.text = my_xml.firstChild.childNodes[0].attributes.feature2D;
      } else {
            trace("XML NOT LOADED!");
      }
};
Avatar of frankybones
frankybones

ASKER

Sorry I guess I should state what the problem is.  My text boxes keep giving a return of "undefined" instead of the text it is supposed to display.
ASKER CERTIFIED SOLUTION
Avatar of sam85281
sam85281

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Both of you gave great solutions to my problem.  Thank you both very much, I greatly appreciate it.  I will post extra points for you two a bit later.  I will make a title under this section called "Extra points for Sam & Aneesh."  Again thank you both.