XML Images - Resize & Center
I've tried a lot of online tutorials for photogalleries but can't find what I'm looking for.
I need to bring in my images from xml so that they will fill the thumbnails (if the width of the image is greater than its height then it will scale to the height of the thumbnail) and center within that thumbnail.
Then, when I click on a thumbnail, I need that image to fill the space allowed for the large photo (this time if the width of the image is greater than its height then it will scale to the width of the photo space) and center within that space again.
In terms if centering the image, I have created movie clips for both the thumbnail and the large photo space (let's call them "imageHolder") and within those movieclips there is an empty movie clip called "image" which is aligned to the centre of "imageHolder". I thought that this would work:
imageHolder.image._x = 0-(imageHolder.image._width/2);
imageHolder.image._y = 0-(imageHolder.image._height/2);
But no such luck.
As for resizing the images to fit the image holders, I'm clueless!
Any help would be greatly appreciated. Thanks for reading.
