# removeMovieClip stupid problem

**URL:** <https://forum.kirupa.com/t/removemovieclip-stupid-problem/89593>\
**Category:** flash\
**Created:** [May 9, 2005, 11:18pm UTC](https://forum.kirupa.com/t/removemovieclip-stupid-problem/89593 "2005-05-09T23:18:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![virusescu](https://avatars.discourse-cdn.com/v4/letter/v/8edcca/32.png) [@virusescu](https://forum.kirupa.com/u/virusescu)\
**Post date:** [May 9, 2005, 11:18pm UTC](https://forum.kirupa.com/t/removemovieclip-stupid-problem/89593/1 "2005-05-09T23:18:18Z")

</div>

Hello again kirupians. I never thought a day like this would come for me. I mean… asking for help removingMovieClip form stage. You think this is easy???

SO. I have a piece of code… that worked for a while. I’m creating MC’s through attachMovie command from library and I have a function that when it’s called was supposed to remove all the MC that had the name starting with “lc”.

```auto

function hideLoadButtons() {
 trace("Hiding all buttons !!!");
 //ready2load = false;//this is not important
 for (var x in _root) {
  if (_root[x]._name.substr(0, 2) == "lc") {
  _root[x]._alpha = 30;
   removeMovieClip(_root[x]);
  }
 }
}

```

Of course I replicated the problem in a new file… creating dozens of mc with script and then removing either using the removeMovieClip as a method, either as a function… i mean…  
removeMovieClip(mc\_to\_remove);  
or  
mc\_to\_remove.removeMovieClip(); Both Worked just fine.  
Furthermore… you could think that in the above function there could be something wrong with the names / paths??? BUT… it’s really not… because when the function it’s called, all the mc’s turn to 30% alpha. This is driving me nuts…

So… I beg you… if anyone has encountered this before, please respond here. Any ideea would be much appreciated :(.  
What could prevent the movieClip from beeing removed off the stage??? :((

---

<div class="post-metadata">

**Author:** ![koshu73](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@koshu73](https://forum.kirupa.com/u/koshu73)\
**Post date:** [May 9, 2008, 3:34pm UTC](https://forum.kirupa.com/t/removemovieclip-stupid-problem/89593/2 "2008-05-09T15:34:46Z")

</div>

Grrrrrr!!! Was having the exact same problem!! Thanks for your post from long ago!! 🙂
