Forum Moderators: open
It seems to read the first 4 results correctly, then all heck breaks loose. Even though I have 6 data points it shows the first 4 correct, then shows 2 more in the trace that don't exist in my XML.
Here's the loop that reads the values form XML:
myVilla = new XML();
myVilla.ignoreWhite = true;
myVilla.onLoad = function(success) {
numimages = this.firstChild.childNodes.length;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = image_tn.createEmptyMovieClip("thumbnail"+i, i);
this.thumbHolder._x = Number(substring(this.picHolder.attributes.xy,0,4) );
this.thumbHolder._y = Number(substring(this.picHolder.attributes.xy,5,7) );
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
this.thumbLoader.attachMovie("Dot", "Dot"+i, this.getNextHighestDepth());
trace(Number(substring(this.picHolder.attributes.x y,5,7)));
};
};
myVilla.load("myxml.xml");
Here's the XML:
<gallery>
<img xy="00000000" />
<img xy="03080580" />
<img xy="04200458" />
<img xy="03670595" />
<img xy="03600650" />
<img xy="03800605" />
</gallery>
I'm not sure where it's getting the 424 and 389 since they aren't in my XML.
Any ideas? This is VERY strange!