# Adding Thumbnails tutorial - position the thumbs

**URL:** <https://forum.kirupa.com/t/adding-thumbnails-tutorial-position-the-thumbs/178522>\
**Category:** Uncategorized\
**Created:** [February 11, 2006, 12:17pm UTC](https://forum.kirupa.com/t/adding-thumbnails-tutorial-position-the-thumbs/178522 "2006-02-11T12:17:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bugiam](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bugiam](https://forum.kirupa.com/u/bugiam)\
**Post date:** [February 11, 2006, 12:17pm UTC](https://forum.kirupa.com/t/adding-thumbnails-tutorial-position-the-thumbs/178522/1 "2006-02-11T12:17:22Z")

</div>

There is this great tutorial here on kirupa where you add thumbnails to a XML photogallery ([http://www.kirupa.com/developer/mx2004/thumbnails2.htm)](http://www.kirupa.com/developer/mx2004/thumbnails2.htm%29).  
Now, everything works fine with horizontal pictures, but when i add vertical images the thumbs positions gets messed up.

now, what i want to do is when it loads the thumbnails it should get the width of the previous thumbnail and position the next thumbnail right after it plus 5 pixels, then everything should work nicely.

(I’ve already fixed how the big image gets positioned with horizontal/vertical images, so that i don’t need any help with)

If someone can point me in to right direction where the positioning of the thumbs are being made, then maybe i can fix it myself.

Thanks! 🍺

// EDIT

[FONT=Arial][SIZE=2]target\_mc.\_x = hit\_left.\_x+(eval(“thumbnail\_mc.t”+k).\_width+5)\*k;

this line is supposed to position the thumbs correctly, but it doesn’t 😕  
[/SIZE][/FONT]
