Wow, that's a heck of a lot easier than all those embed commands. Too bad I can't seem to use classes imported this way and dynamically instantiate them.
This works after linking the swc file as a component instead of using my old embed commands.
var Body:MovieClip = new MovieClip1();
But I cannot build the class name dynamically.
var Definition:Class = getDefinitionByName("MovieClip1") as Class; //undefined
var Body:MovieClip = new Definition();
However, If the movieclip and it's class definition is in the library of my current fla instead of part of the swc, this does work.
var Definition:Class = getDefinitionByName("objectOnStageAndExported") as Class;
var Body:MovieClip = new Definition();
I even tried this code which was working before. It looks up the class name in a two dimensional array of strings, then uses that to instantiate. I swear this was working even without the getDefinitionByName() utility. I don't supose I could replace the "this" with some other identifier which points to the swc?
Definition:Class = this[CreatureParam[Type][Mark2_cb + 2]] as Class;
var Mark:MovieClip = new Definition();
I even tried messing around with getFullyQualifiedName() but had no luck with this either. Tracing the results of this just says [string] which is annoying cause I want the contents of the string.