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?