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:
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();
}
}
}