I can trace everything, but when it coems tothe contentPath, it’s undefined and it doesn’t trace, so it doesn’t load. I’ve been stuck on this for a week. I need help, please!!
Here’s the code. I have a Loader in my library.
Thanks
//laoding XML and defining the nodes..
function loadXML(loaded) {
if (loaded) {
myNode = this.firstChild.childNodes[2].childNodes;
thumb = [];
description = [];
link = [];
totalS = myNode.length;
trace("totals:"+totalS);
for (i=0; i<totalS; i++) {
description* = myNode*.childNodes[0].firstChild.nodeValue;
thumb* = myNode*.childNodes[1].firstChild.nodeValue;
link* = myNode*.childNodes[2].firstChild.nodeValue;
}
firstThumb();
//trace("link:"+myNode*.childNodes[2].firstChild.nodeValue);
}
else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("myList.xml");
////////////
////////////
function firstThumb() {
//dynamic creates loaders)
this.createClassObject(mx.controls.Loader, "myThumb", getNextHighestDepth());
for (j=0; j<totalS; j++) {
trace("J :"+j)
thePic = "myThumb"+j;
trace("thePic: "+thePic);
trace("myURL: "+link[j]);
trace("thumbJ: "+thumb[j]);
**thePic.contentPath = thumb[j];
trace("thePic.contentPath: "+thePic.contentPath);**
thePic.descriptionTXT.text = description[j];
trace("description:"+description[j]);
}
}