# Loading images on stage into a grid!\*\*

**URL:** https://forum.kirupa.com/t/loading-images-on-stage-into-a-grid/223143
**Category:** Uncategorized
**Created:** [April 19, 2007, 9:05pm UTC](https://forum.kirupa.com/t/loading-images-on-stage-into-a-grid/223143 "2007-04-19T21:05:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cookingkym](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@cookingkym](https://forum.kirupa.com/u/cookingkym)
#### Post date: [April 19, 2007, 9:05pm UTC](https://forum.kirupa.com/t/loading-images-on-stage-into-a-grid/223143/1 "2007-04-19T21:05:39Z")

</div>

Hi.

I have a slideshow of images, all being loading via Action Script, i have 20 thumbnail that load up into a strip with this code.

xmlPhotos.onLoad = function() {  
for (var i:Number = 0; i\<xmlPhotos.firstChild.childNodes.length; i++) {  
makeAThumb(i);  
\*\* nextX += 110;\*\*

```
}

```

“NextX + = 110” is what loads them up next to each other nicely.

Okay my problem is i cant work out how to load them into a 5 x 4 grid, with a 10 px gap between them, is this possible? How can i acheive this all through Action Script?

Please Help… ;(

ck
