# Loading the thumbs in the XML Photogallery thumbnail

**URL:** https://forum.kirupa.com/t/loading-the-thumbs-in-the-xml-photogallery-thumbnail/281161
**Category:** Uncategorized
**Created:** [February 5, 2009, 4:44pm UTC](https://forum.kirupa.com/t/loading-the-thumbs-in-the-xml-photogallery-thumbnail/281161 "2009-02-05T16:44:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![noledam](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@noledam](https://forum.kirupa.com/u/noledam)
#### Post date: [February 5, 2009, 4:44pm UTC](https://forum.kirupa.com/t/loading-the-thumbs-in-the-xml-photogallery-thumbnail/281161/1 "2009-02-05T16:44:04Z")

</div>

Hello,

I created a variation of the XML Photogallery thumbnail. I only need the part with the thumbnails,  
there you can scroll through some images, like a carousel.

I started with the version on [http://www.kirupa.com/developer/mx2004/thumbnails.htm](http://www.kirupa.com/developer/mx2004/thumbnails.htm),

and I also downloaded a zip-file from one of the many threads, called thumbnail\_width.fla  
But… I forgot which thread it was.

Anyway, to tell you a bit more about what I did:

- I removed the preloader and the part where you normally see the big image.
- I removed the previous and next button
- I changed the width of the flash movie (579 width, 170 height).
- I added a link for the thumbnails to the xml and to the actionscript

Most of it works fine now, there’s only one thing I would like to change, but I don’t know how to change it in the actionscript.

If the swf loads, no images are visible

the first image is streched, I don’t want that. I just want the first images to be visible (like in the original version)

Here’s the part of the script that preloads the movieclip:

function loadThumb() {  
var target\_mc = thumbnail\_mc.createEmptyMovieClip(“t”+k, thumbnail\_mc.getNextHighestDepth());  
var temp = this.createEmptyMovieClip(“tmp”+k, this.getNextHighestDepth());  
target\_mc.loadMovie(thumbnails[k]);  
thumbnail\_mc.\_width = 1160;  
thumbnail\_mc.\_height = 149;  
temp.onEnterFrame = function() {  
if (target\_mc.\_width) {  
if (k) {  
//if it isn’t the first thumb, get the y position and heigth of the previous thumb  
target\_mc.\_x = thumbnail\_mc[“t”+(k-1)].\_x+thumbnail\_mc[“t”+(k-1)].\_width+0;  
} else {  
//set the first thumb to y = 0  
target\_mc.\_x = 0;  
}  
target\_mc.pictureValue = k;  
target\_mc.onRelease = function() {  
p = this.pictureValue-1;  
nextImage();  
};  
target\_mc.onRollOver = function() {  
this.\_alpha = 50;  
thumbNailScroller();  
};  
target\_mc.onRollOut = function() {  
this.\_alpha = 100;  
};  
target\_mc.onRelease = function() {  
getURL(link[p], “\_self”);  
};  
nextThumb();  
delete this.onEnterFrame;  
}  
};  
}

And I added the whole thing as a zip-file. Hopefully somebody can help me out here!

TIA  
Madelon
