A client has asked me to bundle together a bunch of swfs into a single master one which can load/play them on command. Simple enough to do using loader to fetch external swfs; however, the adserver they're using doesn't support multiple files.
My question is: is it possible to bundle those sub-swfs into the main one so that they are no longer "external files" and the ad-server can be given a single swf?
Importing them to the library doesn't work because it strips scripts (right...?).
Thanks!
No no no no no no no no no (to all the other answers/comments/whatever)!!!!
[Embed(source='someswf.swf', mimeType='application/octet-stream')]
public class SomeSWF extends flash.utils.ByteArray {
}
then:
var loader:Loader = new Loader();
// add your listeners as such.
loader.loadBytes(new SomeSWF());
Then you can just use the standard compiler to bundle your files together. One caveat here is that all the main files MUST have different names, Flash uses the main sprite to deal with applicationDomain -- therefore, if you go this route, make sure to name all your stage classes differently:
class SomeSprite_XXXXXXXX extends Sprite {
// GENERATE YOURLOADER SWFS HERE
public SomeSprite_XXXXXXXXXXXX() {
// load manifest file
// provide api to the ad to load swfs
}
}