# Kirupa XML Gallery - Adjusting Thumbnails Gap

**URL:** <https://forum.kirupa.com/t/kirupa-xml-gallery-adjusting-thumbnails-gap/322374>\
**Category:** flash\
**Created:** [May 19, 2011, 12:49pm UTC](https://forum.kirupa.com/t/kirupa-xml-gallery-adjusting-thumbnails-gap/322374 "2011-05-19T12:49:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovemberRain](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NovemberRain](https://forum.kirupa.com/u/NovemberRain)\
**Post date:** [May 19, 2011, 12:49pm UTC](https://forum.kirupa.com/t/kirupa-xml-gallery-adjusting-thumbnails-gap/322374/1 "2011-05-19T12:49:09Z")

</div>

Hi,

I got a vertical xml gallery from this thread.

> **[XML Photo Gallery](https://www.kirupa.com/forum/showthread.php?t=199861)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

It’s working fine but my problem is my thumbnails having different heights. The code supports only the fixed height thumbnails. Anybody having idea how to automatically adjust thumbnails gap with different heights.

The code is below for adjusting the gap… Red comment marked that area

```auto

function thumbnails_fn(k) {

    thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
    tlistener = new Object();
    tlistener.onLoadInit = function(target_mc) {
        [COLOR=Red]// adujusting gap between thumbs[/COLOR]
             target_mc._y =(target_mc._height)*k;
        //trace(target_mc._width+" "+target_mc._parent._rotation)
        target_mc.pictureValue = k;
        //trace (target_mc.getDepth);

        target_mc.onRelease = function() {
            p = this.pictureValue-1;
            nextImage();
        };
        
        
        target_mc.onRollOver = function ()
        {
            this.getNextHighestDepth();
            scaleme (this);
            
        };
        target_mc.onRollOut = function ()
        {
            scaleout (this);
        };

    };
    image_mcl = new MovieClipLoader();
    image_mcl.addListener(tlistener);
    image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}

```
