# Duplicate movie but with dynamic clips

**URL:** https://forum.kirupa.com/t/duplicate-movie-but-with-dynamic-clips/234576
**Category:** flash
**Created:** [August 3, 2007, 2:01pm UTC](https://forum.kirupa.com/t/duplicate-movie-but-with-dynamic-clips/234576 "2007-08-03T14:01:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jimjiminyjimjim](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jimjiminyjimjim](https://forum.kirupa.com/u/jimjiminyjimjim)
#### Post date: [August 3, 2007, 2:01pm UTC](https://forum.kirupa.com/t/duplicate-movie-but-with-dynamic-clips/234576/1 "2007-08-03T14:01:32Z")

</div>

I’m using this code to create a row of movies:

```auto

var xPos:Number = 0;
for (y=0; y<5; y++) {
	var emptycontainer:MovieClip = _root.holder.createEmptyMovieClip("empcontainer"+y, y);
	var container:MovieClip = _root.holder["empcontainer"+(y)].attachMovie("testclip"+y, "instance"+y, this.getNextHighestDepth());

	//Position the loaded clip based on xPos variable
	container._x = xPos;
	//increase the xPos variable by the width of the movie just loaded.
	xPos += container._width;
	emptycontainer.movnum = y;
	emptycontainer.onPress = function () {
    trace(this.movnum);
}
	
}

```

Is there a way I can easily create an identical row of moviclips with button functionality easily (i.e holder2)? I have a feeling duplicateMovieClip doesn’t support dynamically loaded content. I intend to switch the attachMovie command with a loadMovie to load Jpegs instead of movieclips. It would be good if I don’t have to load them twice.
