[flexcoders] Batching PNGs into an SWF
My app is currently loading around a 100-150 PNGs (around 64x64 to 128x128 in size each) from my server. It's obviously taking way longer than it should, not because of the total size of the transfer but rather the overhead of the multiple connections, i.e. 100-150 separate connections to the server, which may or may not utilize keepAlive (depending on browser), which will be pipelined only two-wide (which will probably be a *good* thing once we have thousands of concurrent users!). Of course, it's utterly unnecessary because every time the app launches it has to pull the same 100-150 PNGs. Yeah, I could embed the PNGs and eat the load time in the app load time, but then I'd require a recompile of the app when the PNGs are updated (not desirable). So, I'm hoping there's a simple solution that looks like this: - a command-line tool that takes a directory full of PNGs and compiles them into an SWF full of BitmapData's. - some AS3 code that loads that SWF and can extract the PNGs by their original filename (or some other obvious key). Anyone able to point me in the right direction on this? I've seen some tools that'll turn an animated GIF into an SWF (close, but not quite), and I know SWF's can be loaded as Modules (which I assume would give me an SWF full of BitmapData objects, or at least embedded asset classes or whatever the correct term is). Any suggestions would be much appreciated! Troy.
Re: [flexcoders] Batching PNGs into an SWF
thirtyfivemph wrote: My app is currently loading around a 100-150 PNGs (around 64x64 to 128x128 in size each) from my server. It's obviously taking way longer than it should, not because of the total size of the transfer but rather the overhead of the multiple connections, i.e. 100-150 separate connections to the server, which may or may not utilize keepAlive (depending on browser), which will be pipelined only two-wide (which will probably be a *good* thing once we have thousands of concurrent users!). You should look into the various unZIP classes out there: - http://codeazur.com.br/lab/fzip/ - http://www.vanrijkom.org/archives/2007/02/far_flasharchiv.html - http://nochump.com/blog/?p=15 Cheers, Claus.
RE: [flexcoders] Batching PNGs into an SWF
You can embed PNGs into a SWF application or module. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Claus Wahlers Sent: Thursday, June 14, 2007 1:49 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Batching PNGs into an SWF thirtyfivemph wrote: My app is currently loading around a 100-150 PNGs (around 64x64 to 128x128 in size each) from my server. It's obviously taking way longer than it should, not because of the total size of the transfer but rather the overhead of the multiple connections, i.e. 100-150 separate connections to the server, which may or may not utilize keepAlive (depending on browser), which will be pipelined only two-wide (which will probably be a *good* thing once we have thousands of concurrent users!). You should look into the various unZIP classes out there: - http://codeazur.com.br/lab/fzip/ http://codeazur.com.br/lab/fzip/ - http://www.vanrijkom.org/archives/2007/02/far_flasharchiv.html http://www.vanrijkom.org/archives/2007/02/far_flasharchiv.html - http://nochump.com/blog/?p=15 http://nochump.com/blog/?p=15 Cheers, Claus.