[FMX04] Still need help with MODS to the XML Photo Gallery Tutorial (thumbs)

Hi I was working with the XML Photo Gallery Thumbnail Tutorial on this site:

http://www.kirupa.com/developer/mx2004/thumbnails.htm

And I modified it for my own usage, making it a vertical gallery instead, and had no problems until I came upon the thumbnail images. When I replaced the original thumbs with my new thumbs (that I sized based on width, as it is a vertical gallery) it got all screwed up. The images are of all different shapes. So when it loads up, some of them had huge gaps in between them, and others were even overlapping. So I fixed it by making the heights of all the images the same, resulting in a working thumb gallery, but now half my thumbs are cropped off by the mask. I’m looking for a way to fix it where I still have the same spacing between the images, and that they are all the same width, but can vary in their height. Here’s the section of the code I am using:

function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip(“tscroller”, 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._xmouse>=thumbnail_mc._x) && (_root._xmouse<=thumbnail_mc._x+thumbnail_mc._widt h)) {
if ((_root._ymouse>=(hit_bottom._y-40)) && (thumbnail_mc.hitTest(hit_bottom))) {
thumbnail_mc._y -= scroll_speed;
} else if ((_root._ymouse<=(hit_top._y+40)) && (thumbnail_mc.hitTest(hit_top))) {
thumbnail_mc._y += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip(“t”+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y = (target_mc._height+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 100;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 50;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], “thumbnail_mc.t”+k);
}


You can see the result on my webpage @ Http://www.patrickmurray.net

Click on the “portfolio” menu, then click “fine art”, then when the new menu loads, click on “painting”


I’m also trouble figuring something out from the same tutorial, that I want to change. The tutorial uses these “Next” and “Previous” buttons. On the far right hand side, the half-circle buttons are what I assigned this to, but I don’t really want them to have that function. I would rather have them function just like how the mouse functions when it rolls over the thumb gallery, except they scroll the thumbs up and down when clicked.


Scotty tried to help and wrote this code which is the current code I have up on my website:

function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip(“t”+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
if (k) {
//if it isn’t the first thumb, get the y position and heigth of the previous thumb
target_mc._y = thumbnail_mc[“t”+(k-1)]._y+thumbnail_mc[“t”+(k-1)]._height;
} else {
//set the first thumb to y = 0
target_mc._y = 0;
}
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 100;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 50;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], “thumbnail_mc.t”+k);
}


This didn’t work either as you can see on my website. And I wrote back on the thread and no one has come to rescue on this one… So hopefully someone can help me with this, because at this point I’m pulling my hair out :frowning:

I think I have it set where I can receive e-mails, but if not, or just in case, my e-mail address is:

tyepoh@gmail.com

A BIG thanks to anyone who helps me out with this!!!

Thanks again!

-Patrick