# Unloading an external .swf (mp3 player)

**URL:** <https://forum.kirupa.com/t/unloading-an-external-swf-mp3-player/256159>\
**Category:** Uncategorized\
**Created:** [March 31, 2008, 1:57pm UTC](https://forum.kirupa.com/t/unloading-an-external-swf-mp3-player/256159 "2008-03-31T13:57:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brookisme](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@brookisme](https://forum.kirupa.com/u/brookisme)\
**Post date:** [March 31, 2008, 1:57pm UTC](https://forum.kirupa.com/t/unloading-an-external-swf-mp3-player/256159/1 "2008-03-31T13:57:33Z")

</div>

hey kids - i´ve loaded an external swf which is a mp3 player. i have a button that removes the player but the sound keeps playing. i´ve seen a few post on this but nothing gives me what i´m looking for.

i´ve tried “Loader(playerLdr).unload()” and just “playerLdr.unload()” both seem to remove the loader (checking using numChildern) but again the sound still plays. i´ve tried .close() but i get an error saying there is nothing streaming. i´ve also of course used removeChild for both the loader and its container.

i should say that the button which unloads the .swf is in the main .swf not the external .swf which gets unloaded.

i´m loading the swf as such:

```
	private function loadPlayer():void {
		var swf_loader:Loader=new Loader;
		var swf_req:URLRequest=new URLRequest("mp3Player.swf");
		swf_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,player);
		swf_loader.load(swf_req);
	}

	private function player(e:Event):void {
		playerLdr = new Loader()
		playerLdr = e.target.loader;
		pContainer.addChild(playerLdr);
		pContainer.visible = true;
                }

```

any ideas?
