Maybe this is more common than I realize; I’m working on a Web project where the initial XML file is 420kb in size—that’s just way too big. I searched for various XML compression utilities, but a few seemed overcomplicated and many of the utilities don’t work on a Mac. In the past, I’ve imported PNG files into FLAs and published them as SWFs. This is an excellent way to reduce the load size of your PNG—while compiling the SWF, Flash compresses the embedded PNG. This gains ~50+% compression of that PNG depending on your publish settings. So, I thought why not add the XML to a variable on the main timeline of an empty SWF. My 420kb XML file is now wrapped within a 24kb SWF making the load time much less significant. Hope this helps someone.
Categories
-
Recent Posts
-
RSS
4 Comments
Thank you!! After some googling I found a tool that batches it for me!!
I have no experience whatsoever with JSFL, I’m not really a programmer actually, I just learn on the fly and enjoy coding in AS3
Thx again
Yeah, I’m quite impressed with how well it works. For your 160 pngs, I’m not sure if would be worth the time to figure out how to set it up if you’re not familiar with it, but I’m betting you can write a JSFL command to handle exporting all of your PNGs as SWFs. Dig around for a few JSFL tutorials… or you may even find a script that does just that.
Wow lol that saves a LOT of space…
I’ve been working on trying to get my PNG’s as small as possible because I’m making an Android APP and the smallest I was able to create was 235kb (from a whooping 960). Now that I used this trick its 96 _O_ thank you!!!
(It’s gonna be a lot of work to convert 160pngs but still it’s worth the kb’s I’m gonna save!!)
great site!
This XML compression tip is something I’ve used in my arsenal as well. Fun to see someone else doing the same thing!