I have the files main.fla, stuff.fla and Script.as in the same folder. Can I get the movieclip myButton from stuff.fla's library to main.swf at compile time? Like if I put
var btn:MovieClip = new myButton();
stage.addChild(btn);
to Script.as and myButton is in main.fla's library it works, but if it's in stuff.fla the code doesn't find it.
You can try load up the fla bytearray and turn it into an swf in flash by doing bytes.compress(CompressionAlgorithm.LZMA) i believe thats the way to build it
it basically just loads an outer swf to allow you to use its library, but you load the library item as a class, you just need to give the library items a class name.
Will these work regardless of where the main.swf is located? I tried some beginner tutorials on some of those, and when I moved the swf it still searched for the path during runtime (and couldn't find anything).
The only reason I'd need this is because having 2000 frames worth of images in the library slows down working on the main file. I can copypaste them from a different file as late as possible, but I was wondering if there was a smarter way to do this.
Here is a quick example on using an external library using ApplicationDomain()
You could always think about using xml to load your images with URLRequest() from a separate folder, using a Loader() to show the loading instead of just waiting.
plenty of tutorials on loading images with xml in as3 on the net.
she says different FLA, not different SWF. what she needs to do is to export SWC and put that in script optoins. very good workflow with heavy assets, btw.