Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / March 2008



Tip: Looking for answers? Try searching our database.

trouble unloading external .swf (mp3player won´t st    op playing!)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
brook - 31 Mar 2008 16:33 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.