Groups | Blog | Home
all groups > flash actionscript > november 2005 >

flash actionscript : Shared Libraries and Loaded Movies


System101
11/29/2005 11:33:32 PM
okay i have a master program that loads in a bunch of subclips.

The subclips each use resources from a shared library location at ../lib.swf

( relative to the master program this is stored at data/lib.swf )

the shared assets work fine in the subclips when they are run on their own but
when theyre loaded dynamically into the master swf, the shared assets cant be
found because its looking for the library items in a directory below the master
program.

changing the linkage of the library relative to the master program
(data/lib.swf) doesnt work because the subclips will never compile to begin
with.

this seems like a pretty big black mark for shared libraries.

( using lockroot or changing the actionscript classpath has no effect on the
results. )
System101
11/30/2005 12:13:23 AM
i can actually fool the thing by making two libraries... one relative to a
subSWF in data/lib.swf

the other relative to the main program in data/lib.swf

then put an instance of the assets in both the subSWF and the main program...

leaving out either one seems to break it all. frankly id like a better
solution than this.
System101
11/30/2005 12:34:13 AM
funny thing.. if i use the convoluted method described above.. in the end i can
get rid of the lib.swf stored at data/lib.swf relative to the subSWF...

it only needs it there at compile time.. im going to try to turn off some
errors and hope.. but i doubt that will help.
man sometimes flash is just weird...
System101
11/30/2005 2:32:47 PM
AddThis Social Bookmark Button