I’m looking into using Flex as a level editor for a flash game project I’m doing for my degree.
However I would like to load the actual game.swf (where all the artwork is done) into the Flex editor, populating a tree/list with all the symbols in the library so they can be visibly referenced in the engine while you are building up your maps and levels.
Is this even possible? I’ve been doing some research for the past few days and I’ve found bits. Like this:
var loader:Loader = new Loader();
loader.load(url);
loader.addEventListener(Event.INIT, callbackFunction);
// in the callback function:
var mcClass:Class =
loader.content.loaderInfo.applicationDomain.getDefinition("instanceName") as Class;
var mc:MovieClip = MovieClip(new mcClass());
This works if you know the instance names of each symbol in the library, is there a way of getting a list of them all so I can loop through something like the code above or simple getting an array of all the symbols?
Thanks, Sam