# Dragging a duplicated movie clip?

**URL:** <https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286>\
**Category:** flash\
**Created:** [July 31, 2003, 8:43pm UTC](https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286 "2003-07-31T20:43:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nauds](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@nauds](https://forum.kirupa.com/u/nauds)\
**Post date:** [July 31, 2003, 8:43pm UTC](https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286/1 "2003-07-31T20:43:16Z")

</div>

I created a button that duplicates a movie clip, I want the user to be able to drag the duplicated movie clip.

Right now, it duplicates the movie clip but when I try to drag it, it moves the first movie clip (the one being duplicated) instead of the one which was duplicated.

Any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 31, 2003, 8:54pm UTC](https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286/2 "2003-07-31T20:54:05Z")

</div>

set up a small movie clip (like a small dot). attach the small clip to the first movie clip. On the new small clip enter this.\_visible = false so noone can see it.  
Next, on frame 1 of the small clip enter  
\_parent.onPress = function() {  
\_parent.startDrag(false, 5,25,200,250);  
};  
with whatever constraints you might want. I am assuming you’ll have a similar onPress function on the original movie clip, just copy it over to the small clip and add \_parent before it.

Hope it helps!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 31, 2003, 8:54pm UTC](https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286/3 "2003-07-31T20:54:38Z")

</div>

If the dragging code is in the movieclip that’s being duplicated, then the code will also be in the duplicates, meaning you should be able to drag all your duplicates.

could you spare us an FLA?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 31, 2003, 9:11pm UTC](https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286/4 "2003-07-31T21:11:31Z")

</div>

this is the current FLA

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 31, 2003, 9:19pm UTC](https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286/5 "2003-07-31T21:19:22Z")

</div>

here’s your FLA fixed, free of charge.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 31, 2003, 10:41pm UTC](https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286/6 "2003-07-31T22:41:32Z")

</div>

wow, thank you =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 1, 2003, 2:14pm UTC](https://forum.kirupa.com/t/dragging-a-duplicated-movie-clip/27286/7 "2003-08-01T14:14:35Z")

</div>

nauds,  
Thoriphes solution is great. The mistake in your FLA is that when you started the drag you had it linked to \_root.circle. The only movie clip with that name is the original circle. Which is why only the original circle would move. Make sense? Thoriphes’ fix works because “this” was used.
