# Just a note on removeMovieClip()

**URL:** <https://forum.kirupa.com/t/just-a-note-on-removemovieclip/152239>\
**Category:** flash\
**Created:** [June 22, 2005, 9:42am UTC](https://forum.kirupa.com/t/just-a-note-on-removemovieclip/152239 "2005-06-22T09:42:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theflash](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/theflash/32/1221_2.png) [@theflash](https://forum.kirupa.com/u/theflash)\
**Post date:** [June 22, 2005, 9:42am UTC](https://forum.kirupa.com/t/just-a-note-on-removemovieclip/152239/1 "2005-06-22T09:42:10Z")

</div>

Well I made a mistake while working with classes and this function…

There are 2 types of removeMovieClip() method…

1. method in MovieClip Class  
mc.removeMovieClip()

2. global method  
removeMovieClip(target\_mc);

Now the problem is…

If you use 2nd one in any class which extends MC class then it creates problem… and rather than removing target\_mc it removes the class instance itself. So it is affecting class rather than target\_mc

e.g.  
Class myMC extends MovieClip  
{  
[indent]var target\_mc:MovieClip;  
…  
[/indent]}  
…  
…  
…  
function removeChild()  
{  
[indent]// PROBLEM  
// this removes the instance of myMC and not target\_mc  
removeMovieClip(target\_mc);

// CORRECT  
target\_mc.removeMovieClip();  
[/indent]}

/////  
Just for the info… Let me know if it is totally correct…
