On Wed, Jul 14, 2010 at 2:37 PM, Michael Iv <[email protected]> wrote:

> I use BulkLoader for managing multiple loads.Very nice tool...
>
I'm also using BulkLoader.

One question though: Calling loader.getMovieClip would always get the same
movieclip so you can't add two copies of the movieclip to the stage. How to
get around this? My solution is to get the Class of the movieclip and
initialize a new one like this:

        public function cloneMovieClip(mc:MovieClip):MovieClip
        {
            var ModuleClassName:String = getQualifiedClassName(mc);
            var appDomain:ApplicationDomain =
mc.loaderInfo.applicationDomain;
            var ModuleClass:Class = appDomain.getDefinition(ModuleClassName)
as Class;
            var result:Object = new ModuleClass();
            return MovieClip(result);
        }

but it requires the SWF to have an export class. It's usually not true for
tools-generated swfs so I have to write another tool to manually insert
export class definitions for those swfs, which is awkward. Is there a
cleaner way to do this? Thanks

- Rujia

Reply via email to