Alright so I'm a flash newb. Our flash guy left, ugh.
I've been struggling for days on this and I need to get this done so any help would be greatly appreciated.
Here's the scenario.
I'm importing a background swf with rotating images for each page.
It works great.
But as I'm sure you could of guess by now, it won't unload when another page is clicked.
I can get the swf to stop playing but it just sits there in the background.
Here's the code
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("backgroundrecruitment.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
function addImage6()
{
mLoader.load(mRequest);
}
function onCompleteHandler(loadEvent:Event)
{
addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
function removeImage6()
{
mLoader.unload();
mLoader.unloadAndStop();
trace("working");
}
When I click another button I call the removeImage6 function.
Can anyone point me in the right direction?