# A few problems with Drag 'n' Drop Game

**URL:** <https://forum.kirupa.com/t/a-few-problems-with-drag-n-drop-game/327654>\
**Category:** flash\
**Created:** [March 16, 2012, 10:57pm UTC](https://forum.kirupa.com/t/a-few-problems-with-drag-n-drop-game/327654 "2012-03-16T22:57:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xCiter](https://avatars.discourse-cdn.com/v4/letter/x/9e8a1a/32.png) [@xCiter](https://forum.kirupa.com/u/xCiter)\
**Post date:** [March 16, 2012, 10:57pm UTC](https://forum.kirupa.com/t/a-few-problems-with-drag-n-drop-game/327654/1 "2012-03-16T22:57:04Z")

</div>

Hey all,

I have two problems with a Drag ‘n’ Drop Game im making for University.

First of all, i get a message saying that:

Error #2025: The supplied DisplayObject must be a child of the caller.

The first image i drag and drop into the bin works fine. It’s only when i try to drag the last movie clip into the bin will this message occur.

Lastly, my simple score increment won’t work. After much fiddling about with it, it still does not want to increase.

I have defined in Global Scope that ‘score:int’

And this is the entire method im using to check which object hits which bin. There is probably a better way but i can’t think of one \>.\<

```auto
    if (objectArray[2].hitTestObject(rubbish))
    {
        removeChild(objectArray[2]);
        score++;
    }
    else if (objectArray[3].hitTestObject(rubbish))
    {
        
        removeChild(objectArray[3]);
        score++;
    }
    else if (objectArray[0].hitTestObject(recycle))
    {
        removeChild(objectArray[0]);
        score++;
    }
    else if (objectArray[1].hitTestObject(recycle))
    {
        removeChild(objectArray[1]);
        score++;
    }

```

My text box is already setup above this code. I just wanted to increase the score by 1. But nothing happens. I constantly get the value ‘0’
