# Drag and drop Counter and message to say correct or wrong

**URL:** <https://forum.kirupa.com/t/drag-and-drop-counter-and-message-to-say-correct-or-wrong/323060>\
**Category:** flash\
**Created:** [June 15, 2011, 1:24pm UTC](https://forum.kirupa.com/t/drag-and-drop-counter-and-message-to-say-correct-or-wrong/323060 "2011-06-15T13:24:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asnewb](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@asnewb](https://forum.kirupa.com/u/asnewb)\
**Post date:** [June 15, 2011, 1:24pm UTC](https://forum.kirupa.com/t/drag-and-drop-counter-and-message-to-say-correct-or-wrong/323060/1 "2011-06-15T13:24:54Z")

</div>

Hi i have created a simple drag and drop game where users have to match shapes by dragging and dropping. What i would like is for a counter to count each correct drop and display a message if they are sucessfull. Here is the code:

```auto

on(press) {
startDrag(this);
}
on(release) {
stopDrag();
if (this._droptarget == "/circletarget") {
this._x = _root.circletarget._x;
this._y = _root.circletarget._y;
}
else{
this._x = 48.0;
this._y = 207.1;
}
}

```

I am using Flash Mx2004. I appreciate any help.:q:
