# How do I drag and drop multiple objects in a mask?

**URL:** <https://forum.kirupa.com/t/how-do-i-drag-and-drop-multiple-objects-in-a-mask/331083>\
**Category:** flash\
**Created:** [May 13, 2013, 4:29pm UTC](https://forum.kirupa.com/t/how-do-i-drag-and-drop-multiple-objects-in-a-mask/331083 "2013-05-13T16:29:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musanna19](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@musanna19](https://forum.kirupa.com/u/musanna19)\
**Post date:** [May 13, 2013, 4:29pm UTC](https://forum.kirupa.com/t/how-do-i-drag-and-drop-multiple-objects-in-a-mask/331083/1 "2013-05-13T16:29:00Z")

</div>

[COLOR=#333333][FONT=adobe-clean]

I’ve been working on a flash simulator to show what our night vision product would look like in the dark. I have been successful in making it work with the following code below. Yet I cannot add a “reticle” image (or symbol) to the draggable mask to make it work. Can someone help me with the code? I looked for hours on the internet and I cannot get it to work. I am new to Flash but am starting to learn as much as I can.[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] **Actionscript 3 Code:** [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean]img\_nv.mask = mask\_mc;[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean]mask\_mc.buttonMode = true;[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean]mask\_mc.addEventListener(MouseEvent.MOUSE\_DOWN, dF);[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean]stage.addEventListener(MouseEvent.MOUSE\_UP, dropF);[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean]function dF(event:MouseEvent):void{[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] mask\_mc.startDrag();[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean]}[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean]function dropF(event:MouseEvent):void{[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] mask\_mc.stopDrag();[/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean] [/FONT][/COLOR]  
[COLOR=#333333][FONT=adobe-clean]}

image\_nv is the background and mask\_mc is the circle.[/FONT][/COLOR]
