# Creating a trash bin mask to removechild

**URL:** <https://forum.kirupa.com/t/creating-a-trash-bin-mask-to-removechild/309684>\
**Category:** Uncategorized\
**Created:** [May 21, 2010, 10:11am UTC](https://forum.kirupa.com/t/creating-a-trash-bin-mask-to-removechild/309684 "2010-05-21T10:11:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evralive](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@evralive](https://forum.kirupa.com/u/evralive)\
**Post date:** [May 21, 2010, 10:11am UTC](https://forum.kirupa.com/t/creating-a-trash-bin-mask-to-removechild/309684/1 "2010-05-21T10:11:12Z")

</div>

Hello,

I’m learning AS3 and I’m doing pretty well at the moment but I’ve got stuck at a point I can’t seem to get past or work out a way to do it. After a few hours of googling I’ve decided to pick the brains of KIRUPA forum.

Basically I dynamically create a dozen movieclips. Now I have drag and drop events on these clips and I want to be able to drag a movieclip, drop it onto a trashbin movieclip that i’ve named ‘trash’ which would then removeChild the movieclip i’ve just dropped it ontop of.

How would I go about doing this?

So let me recap and simplify.

If movieclip A is dragged ontop of movieclip B remove movieclip A.

Hope that makes sense

Cheers

EvraLive
