# Remove child

**URL:** <https://forum.kirupa.com/t/remove-child/285577>\
**Category:** flash\
**Created:** [April 2, 2009, 3:32pm UTC](https://forum.kirupa.com/t/remove-child/285577 "2009-04-02T15:32:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![autumnmedia](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@autumnmedia](https://forum.kirupa.com/u/autumnmedia)\
**Post date:** [April 2, 2009, 3:32pm UTC](https://forum.kirupa.com/t/remove-child/285577/1 "2009-04-02T15:32:29Z")

</div>

hi,

i load a preloader swf into my main swf using addChild,

then if someone clicks skip in my main movie, i want to remove the preloader and go to the next frame,  
for this i use…

skip.addEventListener(MouseEvent.MOUSE\_UP, skipint);  
function skipint(evt:MouseEvent):void {  
MovieClip(root).gotoAndStop(2);  
this.removeChild(myLoader);  
}

thing is the preloader is still there, as the sound carries on playing in the background,  
i then tried using

SoundMixer.stopAll(); to stop the sounds,  
but when the preloader goes to use a new sound that sound still plays in the background?

and help to either get rid of the preloader on the click of a button or to stop it playing sounds!

thanks
