Groups | Blog | Home
all groups > flash actionscript > may 2006 >

flash actionscript : AttachMovie from a loaded SWF


EricNY523
5/9/2006 8:11:01 PM
I'm trying to attach a movie from the library of an SWF I loaded... from what
I've read on on the forums, this is possible, however I can't seem to get it to
work. My setup for the test files is as follows:

CONTAINER.SWF (parent file)
- creates empty_mc to hold child.swf
- loads child swf into empty_mc
- when child.swf is loaded, it calls:
_root.attachMovie("test_mc","myParentTest_mc",50);

CHILD.SWF (child clip)
(insde is a clip "test_mc" with a linkID to match)

Any help on syntax or what I might be doing wrong would be appreciated. If
this setup won't work, could it work the other way? (CHILD.SWF attaches a
symbol from the CONTAINER.SWF???)


.:}x-=V!P=-x{:.
5/9/2006 11:16:55 PM
havent tested this but -
open child.swf and in the library open the properties for test_mc
it should have checked:
export for actionscript
export for runtime sharing
export in first frame
and in the url dialog should be the path and name to container.swf

then open the container.fla and go to file>import>open external library
then drag the test_mc into container.fla library. save and export container
and child swfs good luck
EricNY523
5/10/2006 4:06:31 AM
Thank-you for the response, I thought of that... In my situation, I need to be
able to select one of many large files, and attach assets from it as needed. In
order for me to use attach movie, using shared library assets, they first need
to be placed on the stage before the linkID is properly initialized. If I have
to do this for each "large file" it causes a jump in memory on file startup.
See my other post in the Flash General Discussion:


http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=194&threadid=
1151606&enterthread=y
AddThis Social Bookmark Button