Creating instances of MovieClips set to “Export for Actionscript” in Flash Professional is really easy to do with the following AS3 code:
var myClipClass:Class = getDefinitionByName("MyClip" + "01") as Class;
var myClip:MovieClip = new myClipClass();
addChild(myClip);
The magic occurs when you assign the returned Class to a separate variable. This enables you to construct instances of that Class, and assign them to other variables. Of course, you aren’t limited to only MovieClips, you could construct instances of any type of Class, as long as a definition exists for it.
This technique essentially allows you to do something like:
var test:MovieClip = new ("MyClip" + variable)();
Which is obviously invalid code.
Note: You must assign the Class to a separate variable before you can construct instances of it. Unfortunately, I haven’t found any way to eliminate the need for a separate variable that stores the Class reference.