I have written this a couple of times on this list.

Using shared libraries you can do this. The trick is when you export a
movieclip for runtime sharing & import that clip into the housing swf it
will force the housing swf to drag every other asset from that library to be
shared in the main library.

Take a look at this example. It should tell you everything you need to know.

http://www.codesortium.com/demo/sharedlibrary/example.zip

Jim


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 30 March 2006 17:18
To: [email protected]
Subject: [Flashcoders] MovieClip.loadMovie(),accessing assets in another
Library.


Now, I always thought this couldn't be done. In the past I've designed Flash
systems that dynamically load in hundreds of swf asset files, and the
controlling container swf has instructed loaded-in swfs to attachMovie
assets in their own Library.. eg, the controller has told a loaded movie to
attach and play a Sound asset in its own Library. The attachMovie is
happening within that loaded-in movie's clip level.

However, as most Flash developers know, and the Flash documentation
explains, you cannot attach an asset in a dynamically loaded Flash movie's
Library into a clip in another Flash movie (other than the clip to which the
loaded-in swf is attached).

Sorry if that's as clear as mud.

eg, in the attachMovie doc, 
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/h
tml/wwhelp.htm?context=Flash_MX_2004&file=00001487.html
someone has stuck a comment :-

"You CANNOT attachMovie with assets from a dynamically loaded library to any
other timeline than where the library was loaded.

IE:

Load your swf into _level0.mc1.mc12

you CAN attach to these locations:
_level0.mc1.mc12
_level0.mc1.mc12.mc123
_level0.mc1.mc12.mc124
_level0.mc1.mc12.mc125

you CANNOT attach from this loaded library to these locations:
_level0
_level0.mc1
_level0.mc2
_level0.mc2.mc21
and so on...."




BUT! I've heard on the grapevine that a developer who knows a developer who
knows a developer knows how to attach assets in a dynamically loaded swf's
Library into clips in the containg movie. My client has caught wind of this
and now wants me to do it... I would just dismiss it as nonsense, but
there's a sentence in Macromedia's documentation that makes me wonder
(actually talking about lockroot, which AFAIK only has the purpose of making
_root references in loaded content continue referring to that timeline..

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/h
tml/wwhelp.htm?context=Flash_MX_2004&file=00001519.html

"When calling loadMovie(), set the MovieClip._lockroot property to true in
the loader movie, as shown in the following code. If you don't set _lockroot
to true in the loader movie, the loader has access only to its own library,
but not the library in the loaded movie:"

Could this be a mistake in the documentation? If not, then HOW do you attach
stuff from one movie's Library into another movie??




_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


_______________________________________________
[email protected]
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

_______________________________________________
[email protected]
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

Reply via email to