# Mp3bugs,duplicating sound

**URL:** <https://forum.kirupa.com/t/mp3bugs-duplicating-sound/310699>\
**Category:** flash\
**Created:** [June 17, 2010, 3:42am UTC](https://forum.kirupa.com/t/mp3bugs-duplicating-sound/310699 "2010-06-17T03:42:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhe](https://avatars.discourse-cdn.com/v4/letter/z/b487fb/32.png) [@zhe](https://forum.kirupa.com/u/zhe)\
**Post date:** [June 17, 2010, 3:42am UTC](https://forum.kirupa.com/t/mp3bugs-duplicating-sound/310699/1 "2010-06-17T03:42:51Z")

</div>

Hei, i’ve got problem with unload my child.swf,  
I eksternally loaded and I controlled from main time…  
the bugs are:

1. If I wanna go to another swf file, i still can hear the sound…
2. if I click the button wich linked to mp3.swf, the sound/song are duplicated by2, and then if I click again the sound are duplicated by3…  
how I can fix this problem???

```php
hereis my code to call the child swf :
var Xpos:Number = 140;
var Ypos:Number =100;
var swf:MovieClip;
var loader:Loader = new Loader();

addChild(loader);

// Buttuns Universal function
function btnClick(event:MouseEvent):void {
	
	removeChild(loader);
	var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
	loader.load(newSWFRequest);
	loader.x = Xpos;
    loader.y = Ypos;
	addChild(loader);

}
// Btn listeners
shout.addEventListener(MouseEvent.CLICK, btnClick);
song.addEventListener(MouseEvent.CLICK, btnClick);
gallery.addEventListener(MouseEvent.CLICK, btnClick);
about.addEventListener(MouseEvent.CLICK, btnClick);

```
