# Help Duplicating Movie Cilp

**URL:** <https://forum.kirupa.com/t/help-duplicating-movie-cilp/157817>\
**Category:** flash\
**Created:** [August 4, 2005, 2:21pm UTC](https://forum.kirupa.com/t/help-duplicating-movie-cilp/157817 "2005-08-04T14:21:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben\_2005](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@ben\_2005](https://forum.kirupa.com/u/ben_2005)\
**Post date:** [August 4, 2005, 2:21pm UTC](https://forum.kirupa.com/t/help-duplicating-movie-cilp/157817/1 "2005-08-04T14:21:08Z")

</div>

Hi Peope

This is a project ive been working on for sometime and i cant seem to get my head around it.

Its a game which involves clcik movie clips which are then duplicated on the stage. You then arrange these movieclips to make your own “room”.

**The problem**

The Problem is that the code im using to duplicate the movie clip is not very good in my eyes. I want to be able to use this code for many other movie clips, so that i have a wide variety of “furniture” to be placed on the stage.

Heres the code i use to duplicate.

```auto
var depth = 0;
target.onPress = function() {
var mc = this.duplicateMovieClip("target" - depth, -depth, {_x:350, _y: 200});
mc.onPress = function() {
this.swapDepths(--depth); // make sure this is at the top of the stacking order
this.startDrag();
};
mc.onRelease = mc.onReleaseOutside = function() {
this.stopDrag();
};
}

```

Ive also attached my fla, it would really be appreciated if someone could provide me with a new script i could use

Many Thanks

Ben
