# removeMovieClip() Help please!

**URL:** <https://forum.kirupa.com/t/removemovieclip-help-please/224858>\
**Category:** flash\
**Created:** [May 6, 2007, 11:43am UTC](https://forum.kirupa.com/t/removemovieclip-help-please/224858 "2007-05-06T11:43:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PrinceTaj](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@PrinceTaj](https://forum.kirupa.com/u/PrinceTaj)\
**Post date:** [May 6, 2007, 11:43am UTC](https://forum.kirupa.com/t/removemovieclip-help-please/224858/1 "2007-05-06T11:43:44Z")

</div>

Hi Guys,

For some reason, unbeknown to me, whenever I try to call the removeMovieClip function in a callback handler, it just doesn’t work! Maybe I’m tired, or I’ve just missed something this is apparantly obvious. In my code exert below, is just a simple script that attaches a movie clip to stage (square\_mc) and creates a duplicate instance. When the component button is clicked, I want the original movie clip to be deleted, but nothing happens!

```auto

this.attachMovie("square", "square_mc", this.getNextHighestDepth());

square_mc.duplicateMovieClip("square_mc2", this.getNextHighestDepth(),
                                {_x:50});

var listener:Object = new Object;
listener.click = function(evtObject:Object) {
    square_mc.removeMovieClip();
}

delete_btn.addEventListener("click", listener);

```

If anybody could be as so generous to help me, I would very grateful. Much appreciated.

TAJ
