I’m starting to get the hang of AS3 and its crazy craziness, but I’ve hit yet another roadblock Im hoping someone can help me with.
I’m adding movieclips from an external .as class called GUI. But what I’d like to do is be able to load multiple GUIs through the one class using a dynamic variable. So if I need to load a certain GUI i can just instantiate the GUI class and run newGUI.loadGUI(GUIname); and have it load the correct movieclip based on the variable.
So, syntax aside, it would look something like this:
loadMenu(GUIname) {
GUItoLoad = GUIname;
var mcLoader:GUItoLoad = new GUItoLoad();
myStage.addChild(mcLoader);
mcLoader.addEventListener(Event.ENTER_FRAME,GUItoLoad);
}
*myStage is reference to the root stage from inside the GUI class.
I’ve tried a few different things syntax wise, and have had a search and browse, but have come up empty handed.
Any help would be greatly appreciated!
Brendan