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