You could not treat the entire loaded SWF as a library asset to be
instantiated via attachMovie, but you could do one of two things:
1. You could use duplicateMovieClip. This has the virtue of cloning the
entire root timeline of the loaded swf, but you are limited in your
instantiating parent.
this.load_mc.loadMovie("myMovie.swf");
this.load_mc.duplicateMovieClip("clone_mc", clipDepth);
trace(this.clone_mc);
In this example, 'load_mc' and 'clone_mc' are identical, with the same
parent.
2. Create a library clip inside myMovie, with a linkage id (say
"myLinkage"). Instantiate the clip on your myApp.swf timeline (say as
"myRoot_mc"), and use this clip as your 'main application clip' (very
important). Then use:
this.load_mc.loadMovie("myMovie.swf");
trace(this.load_mc.myRoot_mc);
this.whatever_mc.somechild_mc.attachMovie("myLinkage", "clone_mc",
clipDepth)
trace(this.whatever_mc.somechild_mc.loadchild_mc);
In this example, "this.load_mc.myRoot_mc" and
"this.whatever_mc.somechild_mc.clone_mc" are identical, but with
different parents.
If you don't want to instantiate the library object at compiletime,
don't put the the library clip on the main timeline of myMovie.swf, and
check 'export in first frame'. You would still have the library item
linked as "myLinkage" available to your main application.
Hope that helps,
__________________________________________________________
Joseph Balderson, Flash Platform Developer
http://www.joeflash.ca | 416-768-0987
Writing partner, Community MX | http://www.communitymx.com
Consultant, New Toronto Group | http://www.newyyz.com
grimmwerks wrote:
Is it possible to load in an external swf using loadMovie into a main
movie, and then creating new movies on the fly using attachMovie with
ids of the loaded movie?
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com