In Flash CS3 I was able to duplicate any MovieClip from an external SWF by loading the SWF, and then executing the following code:
var targetClass:Class = MovieClipToDuplicate.constructor;
var duplicate:MovieClip = new targetClass();
Note that the MovieClips I was duplicating did NOT have any linkage explicitly defined. Flash would automatically assign a unique class to each MovieClip.
Now, in Flash CS4, when I try to do the same thing the .constructor property returns only the “MovieClip” class, such that the “duplicate” variable above is but a blank MovieClip.
If I compile the external SWF using CS3, my old code still works. But I want to do it in CS4.
If anyone can tell me a definitive solution, I will be extremely impressed!