# Flash & XML

**URL:** <https://forum.kirupa.com/t/flash-xml/172887>\
**Category:** flash\
**Created:** [December 19, 2005, 12:18pm UTC](https://forum.kirupa.com/t/flash-xml/172887 "2005-12-19T12:18:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fried](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@fried](https://forum.kirupa.com/u/fried)\
**Post date:** [December 19, 2005, 12:18pm UTC](https://forum.kirupa.com/t/flash-xml/172887/1 "2005-12-19T12:18:29Z")

</div>

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);  
}
