# removeMovieClip() question

**URL:** <https://forum.kirupa.com/t/removemovieclip-question/310853>\
**Category:** flash\
**Created:** [June 21, 2010, 2:45pm UTC](https://forum.kirupa.com/t/removemovieclip-question/310853 "2010-06-21T14:45:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lillo\_\_hotmail](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@lillo\_\_hotmail](https://forum.kirupa.com/u/lillo__hotmail)\
**Post date:** [June 21, 2010, 2:45pm UTC](https://forum.kirupa.com/t/removemovieclip-question/310853/1 "2010-06-21T14:45:49Z")

</div>

Hi all!

Can someone please tell me what i’m doing wrong. I’m trying to create a new movieclip in “test\_mc” and then add another from the library. When I press the button I want to remove all.

var myTest = test\_mc.createEmptyMovieClip(“myClip\_mc”, this.getNextHighestDepth());

var myContent = myTest.attachMovie(“info\_mc”,“newClip\_mc”,this.getNextHighestDepth())

test\_mc.onRelease = function()  
{  
removeMovieClip(myTest)  
}

Have a great day!
