# XML/Flash gallery with thumbnail question

**URL:** https://forum.kirupa.com/t/xml-flash-gallery-with-thumbnail-question/187418
**Category:** flash
**Created:** [April 29, 2006, 12:32am UTC](https://forum.kirupa.com/t/xml-flash-gallery-with-thumbnail-question/187418 "2006-04-29T00:32:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hungjuhsia](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@hungjuhsia](https://forum.kirupa.com/u/hungjuhsia)
#### Post date: [April 29, 2006, 12:32am UTC](https://forum.kirupa.com/t/xml-flash-gallery-with-thumbnail-question/187418/1 "2006-04-29T00:32:01Z")

</div>

Hi  
I did the XML photo gallery adding thumbnails tute([http://www.kirupa.com/developer/mx2004/thumbnails.htm](http://www.kirupa.com/developer/mx2004/thumbnails.htm)). Everything works fine for the originally setting but when I am trying to use different sizes thumbnails(different width), the thumbnails start overlaping eachother.

function thumbnails\_fn(k) {  
thumbnail\_mc.createEmptyMovieClip(“t”+k, thumbnail\_mc.getNextHighestDepth());  
tlistener = new Object();  
tlistener.onLoadInit = function(target\_mc) {  
target\_mc.\_x = hit\_left.\_x+(target\_mc.\_width+5)\*k;  
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;  
};  
};  
image\_mcl = new MovieClipLoader();  
image\_mcl.addListener(tlistener);  
image\_mcl.loadClip(thumbnails[k], “thumbnail\_mc.t”+k);  
}

I think no matter what the width of my thumbnails are the above code should still work. I know it might be a easy problem, but I just can’t figure it out. Please help me. Thanks guys;(
