# duplicateMovieClip Problem

**URL:** <https://forum.kirupa.com/t/duplicatemovieclip-problem/269536>\
**Category:** Uncategorized\
**Created:** [August 28, 2008, 5:29pm UTC](https://forum.kirupa.com/t/duplicatemovieclip-problem/269536 "2008-08-28T17:29:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaner](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kaner/32/3158_2.png) [@Kaner](https://forum.kirupa.com/u/Kaner)\
**Post date:** [August 28, 2008, 5:29pm UTC](https://forum.kirupa.com/t/duplicatemovieclip-problem/269536/1 "2008-08-28T17:29:42Z")

</div>

I know it’s a general topic but I really have a problem with duplicating a movieClip. When I try to duplicate it, the code removes the old clip and generates a new one. So not duplicating. Here is the code:

```auto
function AddShape (cShape:String)
{
	S++;
	var Shapes:MovieClip = _root.MainStage.Shapes;
	var myShape = cShape.split("Thumb");
	var mcShape:MovieClip = myShape[1];
	
	_root.MainStage.Shapes.duplicateMovieClip("Shape"+S,_root.getNextHighestDepth());
	
	_root.MainStage["Shape"+S]._x += S*20;
	tellTarget(_root.MainStage["Shape"+S]){
		attachMovie("ShapeHolder","ShapeHolder",_root.getNextHighestDepth());
		ShapeHolder.attachMovie("Shape"+mcShape,"Shape",_root.getNextHighestDepth());
			
		onPress = function(){
			this.startDrag();
		}
		
		onRelease = onReleaseOutside = function(){
			this.stopDrag();
		}
	}
}

```
