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~