# Create thumb holders for slide gallery thumbnails

**URL:** <https://forum.kirupa.com/t/create-thumb-holders-for-slide-gallery-thumbnails/301898>\
**Category:** flash\
**Created:** [December 17, 2009, 2:25pm UTC](https://forum.kirupa.com/t/create-thumb-holders-for-slide-gallery-thumbnails/301898 "2009-12-17T14:25:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![moomo](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@moomo](https://forum.kirupa.com/u/moomo)\
**Post date:** [December 17, 2009, 2:25pm UTC](https://forum.kirupa.com/t/create-thumb-holders-for-slide-gallery-thumbnails/301898/1 "2009-12-17T14:25:21Z")

</div>

I’m beginning to use AS3 and I can’t figure out how to add a series of thumbholders. The following code just pushes to the right the 1 movieclip with instance name “thumb”:

```auto
var thumbnum:Number = 10;//Number of thumbs
var xpos:int = 0;//thumb x position
var clipwidth:int = 20;//thumb width
var sep:int = 30;//thumb separation
var space:int = clipwidth + sep;

thumb.width = clipwidth;

var i:int = 0;

for(i = 0; i < thumbnum; i++){
	thumb.x = xpos;
	xpos = xpos + space;
	trace(xpos);
	
	addChild(thumb);
}

```
