I have a project which calls various .swf’s as needed, from a main timeline.
I need the ability to remove the “current page” before the next one is loaded. I know how to do this with movieclips, but I’ve tried addEventListener to a Loader instance, and I get errors. Here’s what I have so far:
var myLoaderHome:Loader = new Loader ();
var myLoaderAbout:Loader = new Loader ();
var myLoaderContact:Loader = new Loader();
var myURL:URLRequest = new URLRequest(“swf/home.swf”);
var myURL:URLRequest = new URLRequest(“swf/about.swf”);
var myURL:URLRequest = new URLRequest(“swf/contact.swf”);
If I were doing this with movieclips, I would write
var currentPage:MovieClip = new Home();
and export each movieClip to AS. Then as each button was clicked, currentPage would update so it could be removed easily.
To sum up, what’s the syntax to hold various Loader instances in a variable?
On another note, I tried doing the above with movieclips, and as they’re quite large, exporting them to AS caused the swf to be huge-even before they were called. Is there a more efficient way of exporting?
Thanks everyone-sorry for the newbie questions…