Load/Unload Child SWF but Audio keep Playing (Very Important)
Hello Everyone..
This is very important query for me.
I've 3 SWFs, 1st parent and 2 other child SWFs. Both Child SWFs have its own audio/voiceover.
I used script from code snippets section which is 'click to Load/Unload SWF or Image'. So i linked both child swf to parent swf using 2 separate buttons in parent swf.
Finally when i click on any button in parent swf to call child swf, it's working fine and if i click again on same button, it unloads successfully but my problem is when it unloads swf, sound keep plays on background.
What to do for complete unload with sound?
Looks like only video unloads but the audio of child swf keep plays in background. How can i unload audio of child swf permanently ?
I tried 'click to stop all sound' but looks like it's only mutes the sound, not unloads.
Plz help! this is very important for me.
Code which i'm using right now in parent swf-
button_1.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);
import fl.display.ProLoader;
var fl_ProLoader:ProLoader;
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad:Boolean = true;
function fl_ClickToLoadUnloadSWF(event:MouseEvent):void
{
if(fl_ToLoad)
{
fl_ProLoader = new ProLoader();
fl_ProLoader.load(new URLRequest("Child !.swf"));
addChild(fl_ProLoader);
}
else
{
fl_ProLoader.unload();
removeChild(fl_ProLoader);
fl_ProLoader = null;
}
// Toggle whether you want to load or unload the SWF
fl_ToLoad = !fl_ToLoad;
}