Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimizing AS3 SWF files for size?

Are there any tips / best practices / secrets for optimizing the size of AS3 SWF files? In particular, any way to get a breakdown of what is taking up space inside the SWF, like you used to be able to in the old Flash 7/8 days? I'm not using the Flash IDE any more, but now I'm using either Flex Builder or FlashDevelop, so it needs to be something that I can do without the Flash IDE.

like image 206
davr Avatar asked Feb 15 '26 13:02

davr


2 Answers

If you're interested what in the code is taking up space, you can get that information from the link report. It's not as detailed as what you can get out of the Flash IDE, but it shows the size of each class (uncompressed.)

To create a link report, use the -link-report <filename> flag on mxmlc. It creates an XML file with information about the classes linked into your SWF.

I used the .XSL file described in the link below to clean it up and make it more readable: http://blog.iconara.net/2007/02/25/visualizing-mxmlcs-link-report/

like image 123
thehiatus Avatar answered Feb 17 '26 08:02

thehiatus


One tip would be to try Joa Ebert's "Reducer" tool which can greatly reduce the size of any PNG files in your SWF if you used the embed tag.

http://blog.joa-ebert.com/2009/08/08/reducer/

like image 32
Allan Avatar answered Feb 17 '26 06:02

Allan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!