Unload a movie when the next movie loads
I have a main swf (2017XmasParty.swf) that I've placed the following code in frame 1. That is all I have in my main swf timeline.
var swf1:MovieClip;
var loader1:Loader = new Loader();
var defaultSWF1:URLRequest = new URLRequest("Board.swf");
loader1.load(defaultSWF1);
addChild(loader1);
In Board.swf I've placed the same code on the Actions layer, frame 1400 which is the last frame of my timeline. Of course I changed the swf file name to my next swf that I want to load and play after Board.swf. This works great with the exception that the previous movie is lopping and plays simultaneously with the next swf.
I am fairly new to animate and actionscript and I've been searching for a solution but everything I read is to click on something to control the actions. I have 11 swf files that I want to play one after the other and loop. Each file has the above script to load the next with the last one reloading the first.
I need to know how to make them unload after they play and the next one loads. I'm under a deadline and would greatly appreciate some advice!
Thank you!
