# Xml data rendering problem

**URL:** <https://forum.kirupa.com/t/xml-data-rendering-problem/200666>\
**Category:** Uncategorized\
**Created:** [September 14, 2006, 3:14am UTC](https://forum.kirupa.com/t/xml-data-rendering-problem/200666 "2006-09-14T03:14:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eclectrik](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@eclectrik](https://forum.kirupa.com/u/eclectrik)\
**Post date:** [September 14, 2006, 3:14am UTC](https://forum.kirupa.com/t/xml-data-rendering-problem/200666/1 "2006-09-14T03:14:37Z")

</div>

Okay guys, basically i am attaching a movie dynamically with the attachmovie method like so:

for(var y = 0; y \< rowSize; y++) {  
for(var x = 0; x \< colSize; x++) {  
attachMovie(“box”, “box” + count, count);  
var path = \_root[“box” + count];  
count++;  
path.id = count;  
path.img = photos[count-1];  
path.con.scaleTo(30,0,“linear”);

okay thats my for loop, pretty nifty and powerful script for a beginner like myself, now for each attachmovie they have a Event handler, rollover,rollout, but, on the release event holder I want it to load in some XML like so:

path.onRelease = path.onReleaseOutside = function(){  
//alot of my nifty code that will be skipped for elongated post purposes  
//but here is where im getting a error  
this.attachMovie(“info”,“info”+this.count,12);  
\_global.work = this[“info”+this.count];  
this.box.alphaTo(0,0);  
work.\_x = 600;  
work.\_y = 40;  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“info.xml”);  
function loadXML(loaded) {  
if (loaded) {  
for(var j = 0; j\<xmlData.childNodes.length; j++){  
var typ = (xmlData.childNodes[j].attributes.typ);  
var prog = (xmlData.childNodes[j].attributes.program);  
var desc = (xmlData.childNodes[j].attributes.desc);  
work.type\_txt.text = typ;  
work.program\_txt.text = prog;  
work.desc\_txt.text = desc;  
trace(“file is loaded”);

I thought at first having the XML declared in the loop does make it just loop through 15 times ( length of my nodes) and just display the last XML item, but when i declare it before it, it does NOTHING !!! it doesnt even display a ■■■■ thing, soon as i put it within my loop it displayed atleast something, can anyone help me please ?
