Button to navigate and unload swf
I have the following code to load an external swf by clicking a button. It works fine.
btn_01_01.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);
function fl_ClickToLoadUnloadSWF(event:MouseEvent):void
{
var url:String = event.currentTarget.name+".swf";
fl_Loader.load(new URLRequest("loads/TEST_VID_AS3.swf"));
}
I also have a button that takes me to another place on the timeline.
this.btn_back_main.addEventListener(MouseEvent.CLICK,fback_main);
function fback_main(evt:MouseEvent)
{
MovieClip(this.root).gotoAndPlay("main");
}
But the loaded swf is still visible.
I would like that button to also unload the loaded swf.
Can anyone tell me if it's possible and suggest code?
Thank you in advance.
