# Multiple rows (Image gallery)

**URL:** <https://forum.kirupa.com/t/multiple-rows-image-gallery/221893>\
**Category:** flash\
**Created:** [April 9, 2007, 5:47am UTC](https://forum.kirupa.com/t/multiple-rows-image-gallery/221893 "2007-04-09T05:47:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thebestguest](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@thebestguest](https://forum.kirupa.com/u/thebestguest)\
**Post date:** [April 9, 2007, 5:47am UTC](https://forum.kirupa.com/t/multiple-rows-image-gallery/221893/1 "2007-04-09T05:47:26Z")

</div>

Hello Everyone. What I would like to have is multiple rows of thumbnails with the following gallery. Right now it only puts them in a straight line but I’d like to have it so after 5 thumbnails are loaded, a new row of thumbnails is started. I don’t know enough actionscript to do this myself.

```auto

myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
    //portfolioTag = this.firstChild;
    numimages = this.firstChild.childNodes.length;
    spacing = 100;
    for (i=0; i<numimages; i++) {
        this.picHolder = this.firstChild.childNodes*;
        this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
        this.thumbHolder._x = i*spacing;
        this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
        this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
        this.thumbHolder.title = this.picHolder.attributes.title;
        this.thumbHolder.main = this.picHolder.attributes.main;
        this.thumbHolder.onRelease = function() {
            loader.loadMovie(this.main);
            title_txt.text = this.title;
        };
    }
};
myPhoto.load("xmlphoto.xml");

```

If someone can tell me what I would need to do to correct this code or can actually take the time to correct it for me, I’d very much appreciate it. Thank you.

Example of what I want:

x x x x x  
x x x x x  
x x x x x

Each x = a thumbnail
