Here is my code:
new mx.transitions.Tween(holder_mc, “_alpha”, Strong.easeIn, 0, 100, 3, true);
function loadXML(loaded) {
if (loaded) {
_root.image = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.description = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.description2 = this.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
** _root.image2 = this.firstChild.childNodes[1].childNodes[0].firstChild.nodeValue;
_root.desc = this.firstChild.childNodes[1].childNodes[1].firstChild.nodeValue;
_root.desc2 = this.firstChild.childNodes[1].childNodes[2].firstChild.nodeValue;**
name_txt.text = _root.description;
comment_txt.text = _root.description2;
holder_mc.loadMovie(_root.image,1);
} else {
trace(“file not loaded!”);
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“file.xml”);
next_btn.onRelease = function(){
name_txt.text = _root.desc;
comment_txt.text = _root.desc2;
holder_mc.loadMovie(_root.image2,1);
}
The thing is when the button is pressed it does not load the next values. It just gives me an undefined. The code in bold is the next level in the XML structure. ?? Please help.