# Drag and Drop

**URL:** <https://forum.kirupa.com/t/drag-and-drop/316131>\
**Category:** Uncategorized\
**Created:** [November 13, 2010, 5:39pm UTC](https://forum.kirupa.com/t/drag-and-drop/316131 "2010-11-13T17:39:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![na\_il](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@na\_il](https://forum.kirupa.com/u/na_il)\
**Post date:** [November 13, 2010, 5:39pm UTC](https://forum.kirupa.com/t/drag-and-drop/316131/1 "2010-11-13T17:39:07Z")

</div>

I want to have an image and when I click on the image , one can hold down the mouse and drag a copy to where ever on the stage and when one lets go, one can drag another and another with each copy still being able to be dragged after released. Any help will be appreciated!

this is what i have but its pretty simple and doesn’t work…

stage.addEventListener(MouseEvent.MOUSE\_DOWN,makeABox);

var i:Number = 1; //i will be the total number of boxes  
var newBox:myMC = new myMC();

function makeABox(evt:MouseEvent):void {  
trace(“new box #” + i);  
addChild(newBox);  
newBox.x = square.x;  
newBox.y = square.y;  
newBox.startDrag();

```
//newBox.y = mouseY;
i++;

```

}
