[RESOLVED] Main.swf to load and unload scene.swfs
Hello there.
I've just recently made the leap from AS2 to AS3 and after several days of reading the CS4 help and searching posts here, I'm still at a loss how to get my first AS3 project off the ground.
I'm working on an illustrated choose-your-own-path story with each step split into seperate swfs to speed up loading time.
I've got a main file loading a scene swf using...
import flash.display.*;
var screen:MovieClip = new MyMovieClip();
addChild(screen);
var request:URLRequest = new URLRequest("scene1.swf");
var loader:Loader = new Loader();
loader.load(request);
screen.addChild(loader);
The loading works fine (although I've just found a post that suggests I should wait until the swf loads before adding it as a child), but how would I then get the buttons in the loaded swf to tell the main swf which swf to load next?
I'm stumped firstly by that, and additionally by how I should then UNload the swfs. Is it not common practice to refer to objects by their '.name' in AS3? Should I be loading the swfs into an array?
If someone could offer just a snifter of assistance, I'd greatly appreciate it.
Cheers.