views:

162

answers:

1

I've found several javascript minify tools however they do something weird with open and close braces, even though ActionScript is based on ECMAScript it doesn't seem to work. Wondering if anyone knows of an actionscript3 minifier that I could use. Anyone?

+5  A: 

There is no need to minify AS3. AS3 gets compiled to bytecode which is then wrapped in a gzip compressed swf.

Sam
Why are flash decompilers able to extract so much information out, including variable names and comments? Seems like there's plenty of room for minification.
Jay Paroline
@Jay Paroline, Minification is meant to reduce space which isn't needed since swf is a compressed format. If you want to hide from decompilers than you wand an obfuscator.
Sam
Doesn't minification also involve stripping comments and replacing vars with smaller names? Does compression really make the space difference negligible?
Jay Paroline
@Jay Paroline, compilation strips comments. There's even more to it than compression though. AS3 code is compiled to bytecode which means the only strings left are your variable names and the literals. All code elements are converted to binary representations. Minification does nothing for code elements except remove whitespace. Then AS3 is compressed on top of that.
Sam