# \[Flash CS3\] Need urgent help with hittest

**URL:** https://forum.kirupa.com/t/flash-cs3-need-urgent-help-with-hittest/318279
**Category:** flash
**Created:** [January 15, 2011, 9:29am UTC](https://forum.kirupa.com/t/flash-cs3-need-urgent-help-with-hittest/318279 "2011-01-15T09:29:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Shturmi](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@Shturmi](https://forum.kirupa.com/u/Shturmi)
#### Post date: [January 15, 2011, 9:29am UTC](https://forum.kirupa.com/t/flash-cs3-need-urgent-help-with-hittest/318279/1 "2011-01-15T09:29:00Z")

</div>

Hi all.  
I’m trying to create some sort of a recycle bin in a presentation of mine, meaning that if you drag a symbol to it (“it” being the movie clip that represents the recycle bin) the symbol would disappear.  
What I’ve done is made a symbol (instance named “ball”) with a stop(); command on its first frame, and an animation of it fading away in its own timeline.  
I’ve made the ball draggable using this script:

on(press){  
startdrag("");  
}  
on(release){  
stopDrag();  
}

I then created a movieclip instance named “trash”, and on the one frame that is on the main timeline I added the script:

if(ball.hitTest(trash)){  
ball.gotoAndPlay(2);  
}

Yet for some reason, that just does not work.  
When I drag and drop the ball on the “trash” symbol, nothing happens.  
I have also tried to insert the hittest script into the ball’s script instead of the frame’s, like so:

on(press){  
startdrag("");  
}  
on(release){  
stopDrag();

if(ball.hitTest(trash)){  
ball.gotoAndPlay(2);  
}  
}

but that didn’t work either.

I’ve attached my fla file to this post.  
Any idea what I’m doing wrong?

Thanks in advance~
