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(Even t.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?
brook - 31 Mar 2008 18:06 GMT
i´ve fixed my problem by establishing an "LocalConnection" between the
SWFs (stoping the player remotely) --- still it seems there should be
a cleaner way ... let me know if you have a better solution.
thanks!
.brook
> 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
[quoted text clipped - 28 lines]
>
> any ideas?