# Audio stays after removeChild

**URL:** <https://forum.kirupa.com/t/audio-stays-after-removechild/295572>\
**Category:** flash\
**Created:** [September 1, 2009, 2:32pm UTC](https://forum.kirupa.com/t/audio-stays-after-removechild/295572 "2009-09-01T14:32:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnnaGatta](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@AnnaGatta](https://forum.kirupa.com/u/AnnaGatta)\
**Post date:** [September 1, 2009, 2:32pm UTC](https://forum.kirupa.com/t/audio-stays-after-removechild/295572/1 "2009-09-01T14:32:46Z")

</div>

Hi,

I have a test site on: [http://www.gattadesign.fr/testsite/index.html](http://www.gattadesign.fr/testsite/index.html) with a problem that the sound doesn’t stop when I removeChild… The playing movie with the music is to stay only on HOME.  
\*\*  
My code on the first frame of the label “HOME”:\*\*  
var Xpos:Number=243;  
var Ypos:Number=88;  
var swf:MovieClip;  
var loader:Loader=new Loader();

var defaultSWF:URLRequest=new URLRequest(“GD\_HOME\_banner.swf”);

loader.load(defaultSWF);  
loader.x=Xpos;  
loader.y=Ypos;  
addChild(loader);

\*\*  
My code on the first frame of the label “PORTFOLIO” that stretches over the rest of the site:\*\*  
removeChild(loader);  
(“GD\_HOME\_banner.swf”);

I think I am supposed to add an EventListener but can’t figure out where or how…

Would be very happy to get a solution since I have been wasting many hours… :-/

P.S 1. First time I write Kirupa but not the first time you help me. Great having guys like you around!

P.S 2. If someone has a slick solution for adding a Blog into Flash via iFrame or other way, I am all ears.

Kindly, anna
