I have loaded a XML file on a MC inside my scene and want to use its information (nodes) within different buttons
I loaded it as follow:
function loadXML(loaded) {
if (loaded) {
_root.Name = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.LName= this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.Number= this.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
name_txt1.text = _root.Name;
comment_txt1.text = _root.LName;
n=_root.Number
}
else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("list.xml");
Can I convert the nodes to variables and can I use them along the hole scene?