Simply put, I adapted the flash/xml slideshow w/ thumbnails from the Kirupa tutorial (found here http://www.kirupa.com/developer/mx2004/thumbnails.htm) to suit my needs. I’ve got no problem getting it to work (the changes I made are minimal) but the one issue I have it that the full size images I want to load in are all different sizes.
This will be eventually be part of a portfolio site for an artist friend of mine and all her pieces are various dimensions. For the thumbnails, I used identically sized cropped out details of the pieces for uniformity, but I can’t do that for the full sized images and still show the entire piece.
I was wondering if anyone could show me if there’s a way to automatically center the images in the viewing area when they load in (vertically and/or horizontally both depending on the dimensions of the image).
What I’ve done so far is at this URL: http://www.io.com/~dugless/jessie/new.htm
The light gray area behind the large images defines the dimensions of the area I want the images to be centered in. Currently the images are being loaded into an empty movieclip (with the instance name "picture).
Here’s (what I’m pretty sure is) the pertinent code:
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
I can feel my way around actionscripting but I’m not particulary proficient so any help that anyone could give would be highly appreciated.
Thanks!