Hi everyone, I’ve started messing arund with flash and XML. I have a mc which loads pics from the XML. The text is also loaded into textboxes from the XML file. when the next_btn is presses it should load the following node. It just gives me an undefined and output error canoot load… 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(“ofm3.xml”);
next_btn.onRelease = function(){
name_txt.text = _root.desc;
comment_txt.text = _root.desc2;
holder_mc.loadMovie(_root.image2,1);
}