hej folks,
I'm writing an assetloader class, with the intention of attaching a whole
bunch of instances to the stage of a loaded asset. Because I want to attach
more than one instance of the loaded SWF, I'm having to duplicate the asset
instead of just using addChild, because you can only addChild one instance
of an object to the stage at a time.

So, I've written the following function in a class which extends Loader:

public function get asset():DisplayObject{

var cn:String = getQualifiedClassName( contentLoaderInfo.content );

var c:Class = Class( contentLoaderInfo.applicationDomain.getDefinition( cn )
);

return( DisplayObject( new c() ) );

//return( contentLoaderInfo.content );

}

However, when I try to use the duplicated asset, I can't control its
timeline, and any sound on that timeline is heard whether it's attached to
the stage or not. Basically, I suspect that duplicating the asset is
mangling its timeline somehow. Uncommenting the commented return and
commenting everything else out gives me a movieclip that behaves how I
expect, but of course can only be attached to the stage once.

Has anyone tried stuff like this before (duplicating a loaded SWF with
timeline intact)?

h.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to