Hello, I have a small flash website where one of the pages has an embed flv video with sound. I need to it unload when the next swf is called through uiLoader. This is the code I am using to call the swfs.
but1.addEventListener(MouseEvent.CLICK, loadsSWF);
but2.addEventListener(MouseEvent.CLICK, loadsSWF);
but3.addEventListener(MouseEvent.CLICK, loadsSWF);
but4.addEventListener(MouseEvent.CLICK, loadsSWF);
but5.addEventListener(MouseEvent.CLICK, loadsSWF);
function loadsSWF(event:MouseEvent):void{
if(event.target.name=="but1"){uiLoader.source=null;uiLoader.source="home.swf";} else
uiLoader.unload();
if(event.target.name=="but2"){uiLoader.source=null;uiLoader.source="media1.swf";} else
if(event.target.name=="but3"){uiLoader.source=null;uiLoader.source="project1.swf";} else
if(event.target.name=="but4"){uiLoader.source=null;uiLoader.source="news1.swf";} else
if(event.target.name=="but5"){uiLoader.source=null;uiLoader.source="contact.swf"; }
}
Any help of guidance would be appreciated. Thanks!