-
Hey Nate...
It ended up being just some missed function closing tags. If you'll notice, the onRelease function within the loop isn't closed.
Here is the fixed version:
Code:
myPhoto = new XML();
myPhoto.ignoreWhite = true;
var count:Number = 0; // Variable that counts how many movieclips have rendered thus far
var yPos:Number = 0; // Initial _y coordinate of the first row
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 70;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
this.thumbHolder.title = this.picHolder.attributes.title;
this.thumbHolder.main = this.picHolder.attributes.main;
this.thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
}
if (count == 4) { // if count = 4, we're at the end of the row
count = -1; // reset count to 0
yPos = yPos + 100; // incease the _y coordinate for the next row (100 = height of element plus padding)
}
this.thumbHolder._x = count*spacing // set _x coordinate
this.thumbHolder._y = yPos; // set _y coordinate
count++; // increase count by 1
};
};
myPhoto.load("xmlphoto.xml");
-
Medyman,
Thanks for taking the time and sticking with my post, your work helped me fix the issue I was having. Also your description lines made it easy for me to understand what the functions do and how to use them.
I had to change a few variables to space out the thuumbs and to run the lines vertically instead of horizontal. But the code was easy to understand and took seconds to change.
Thanks a million!
-- Nate
-
Awesome. Glad you got it working.