XML Gallery Help (code fix)
I am new to XML galleries in flash and I am using a tutorial I found online but I am not sure how to go about making a change.
I would like to change the thumbnails from displaying a single row horizontally to multiple lines.
Of course there is a restriction to width (limit thumbs to about 4 or 5 per row) as the thumbs will be displayed on the left of the main picture.
Does anyone have any idea or can point me in the right direction to solve this problem?
Code:
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 60; //Spacing between thumbnails
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbHolder._x = i*spacing; //Up and down direction for thumbnails
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;
};
}
};
myPhoto.load("xmlphoto.xml");
Thanks,
-- Nate