# FLASHMX04: help!: duplicate/drag and drop movieclips

**URL:** <https://forum.kirupa.com/t/flashmx04-help-duplicate-drag-and-drop-movieclips/211318>\
**Category:** flash\
**Created:** [December 29, 2006, 9:20pm UTC](https://forum.kirupa.com/t/flashmx04-help-duplicate-drag-and-drop-movieclips/211318 "2006-12-29T21:20:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juanita37](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@juanita37](https://forum.kirupa.com/u/juanita37)\
**Post date:** [December 29, 2006, 9:20pm UTC](https://forum.kirupa.com/t/flashmx04-help-duplicate-drag-and-drop-movieclips/211318/1 "2006-12-29T21:20:18Z")

</div>

I realize there are related threads to moviclip duplication, and I’ve been studying them, but so far i still haven’t been able to answer my question and am tearing out my hair!

—I am making a program that allows the user to drag a movieclip onto a grid, making a pattern of their choice with duplicates of that clip. I made an grid to which the movieclip duplicates can “snap” to. I can now drag one copy of the original movieclip and “snap” it to the grid. That part is at least working great.

My problem that I can only drag and drop [COLOR=“Red”]one copy of the original movieclip.[/COLOR]  
[COLOR=“red”]I want to be able to drag a new duplicate movieclip everytime I drag and drop the original movieclip, [/COLOR]creating multiple copies of the original clip.

—here’s my code:  
I have a movieclip with code that tells it to “snap” to my grid (this part is working great!). Inside that movieclip there is a button with the following:

on (press) {  
[COLOR=“DimGray”]//when dragging is true, tells the movieclip to “snap” to the grid.[/COLOR]  
dragging = true;  
}

on (release, releaseOutside) {  
dragging = false;  
[COLOR=“Gray”] //add 1 to the currentclip variable so that the new movieclip will have a new name and depth[/COLOR]  
currentClip = currentClip + 1;  
trace(currentClip);  
[COLOR=“Gray”]//make a duplicate of the movieclip that is being dragged[/COLOR]  
purple\_mc.duplicateMovieClip(“newpurple” + currentClip, currentClip)  
}

sorry for the rather long post, but any help would be very much appreciated.  
thanks!
