# Drag & drop problem

**URL:** <https://forum.kirupa.com/t/drag-drop-problem/270127>\
**Category:** Uncategorized\
**Created:** [September 5, 2008, 11:50am UTC](https://forum.kirupa.com/t/drag-drop-problem/270127 "2008-09-05T11:50:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcogiannini](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@marcogiannini](https://forum.kirupa.com/u/marcogiannini)\
**Post date:** [September 5, 2008, 11:50am UTC](https://forum.kirupa.com/t/drag-drop-problem/270127/1 "2008-09-05T11:50:35Z")

</div>

hi all,  
I’m a newby in AS. I have to build a coin counter: something like:

1. I find a coin on the screen, and I take it
2. When I’ve taken it, it goes in my backpack, and a coin counter get “+1”
3. When I click on my coin figure in my backpack, the coin turn draggable and as long as I press the mouse down, the mouse.hide function keep on, the coin remain visible instead of the mouse
4. When I release the mouse button, if the coin makes a hitTest with an object, the coin disappear, the mouse turn visible, the counter near my backpack get “-1”… If not, the coin go back to my backpack (also without animation) and the counter remain at the value it was.

I tought it was a simple task, but I can’t make it!:td:  
I tried in a lot of different ways, but problems grew up: in a few words, I can’t drag an attached MC (don’t know why), so if I use my first moved mc I can’t use the same function (on.Press) when I first take it on the stage and then, when I move it outside of the backpack… and a lot more…

I’m a bit freustrated, please gimme a help!

thanking you in advance
