# Thumbnails in a row

**URL:** https://forum.kirupa.com/t/thumbnails-in-a-row/89318
**Category:** Uncategorized
**Created:** [May 7, 2005, 12:15am UTC](https://forum.kirupa.com/t/thumbnails-in-a-row/89318 "2005-05-07T00:15:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Henxon](https://avatars.discourse-cdn.com/v4/letter/h/51bf81/32.png) [@Henxon](https://forum.kirupa.com/u/Henxon)
#### Post date: [May 7, 2005, 12:15am UTC](https://forum.kirupa.com/t/thumbnails-in-a-row/89318/1 "2005-05-07T00:15:40Z")

</div>

Hi

I use this code to try to create a photo thumbnail slider from an array loaded with the images names. The problem is that I can create one thumbnail with my code as shown, but I get in trouble when I try to make thumbnails of more than one image from the array. How should I work around this?

I want the thumbnails to create a nice row, that I can use in a “infinite image slider”…

regards, henrik

```auto
//image array
//the array that holds the images names
imgArray = _root.getCurrentArray();
//the path to the images folder
imgFolder = _root.getCurrentImgFolder();

size = imgArray.length;

//image nr:
imgIndex = 0;

//load first image
loadThumb();

//load thumbnail------------------------------------
function loadThumb(){
	// make a movieclip for each of the jpeg's
	mc = this.createEmptyMovieClip("thumbnail",1);
	
	//placement
	mc._x = imgIndex*42;
	mc._y = 0;
	
	// load in the jpeg
	mc.loadMovie(imgFolder+imgArray[imgIndex]);
}

// preload the jpeg
this.onEnterFrame = function () {
	// preload the picture
	if (mc.getBytesTotal()>4&&mc.getBytesLoaded()>=mc.getBytesTotal()) {
		//pic has loaded in completely
		mc._width = 50;
		mc._height = 50;
		delete mc.onEnterFrame;
   }
}

```
