Question
Link Text from XML to Dynamic Text fields
Hello Adobe friends,
i have an old flash file which uses ActionScript 2 to read a local XML File and bind some data from it to dynamic Text fields (header1 and header2).
This is the code but it will not work in Animate CC:
stop();
var XMLdaten = new XMLDocument();
XMLdaten.ignoreWhite=true;
XMLdaten.load("list.xml");
XMLdaten.onLoad = function(success) {
if (success) { //wenn das laden der File erfolgreich war
_root["header1"].text = XMLdaten.childNodes[1].childNodes[0].nodeValue;
_root["header2"].text = XMLdaten.childNodes[2].childNodes[0].nodeValue;
}
}
play();
Also i dont know what _root is. I guess it is something like the document tree?
Can you please help me out here?
Thank you very much!
Greetings,
Fred
