# Flash XML woes .. Help needed

**URL:** <https://forum.kirupa.com/t/flash-xml-woes-help-needed/168891>\
**Category:** Uncategorized\
**Created:** [November 10, 2005, 11:48pm UTC](https://forum.kirupa.com/t/flash-xml-woes-help-needed/168891 "2005-11-10T23:48:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kungFuChris](https://avatars.discourse-cdn.com/v4/letter/k/a3d4f5/32.png) [@kungFuChris](https://forum.kirupa.com/u/kungFuChris)\
**Post date:** [November 10, 2005, 11:48pm UTC](https://forum.kirupa.com/t/flash-xml-woes-help-needed/168891/1 "2005-11-10T23:48:02Z")

</div>

Hi all,

I am trying to display some XML data in flash. but I am stuck at displaying the data in dynamic text files…

what I want to do is for every xml record create a movie clip and position it randomly on the stage. inside of that movie clip there is a button when clicked it displays the info from that particular XML.

anyone … help… thanks in advance the code so far is below…

> 

function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
firstname = ;  
lastname = ;  
shoutout = ;  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
firstname\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
lastname\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
shoutout\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;

// this does not work, I am trying here to make as many movie clips as the total nodes  
var t = this.attachMovie(“image”,“image”+i,i);  
t.\_x = Math.random()\*700;  
t.\_y = Math.random()\*400;

}

} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“results.xml”);
