===== The Flash 9 compiler ===== As you know, I discovered the AS3 compiler asc.jar in Flex 2 in the early alpha versions (see post: The As3 compiler from macromedia). Today I go over my errors again presenting you the Flash 9 AS3 compiler: asc_authoring.jar You’ll find it in the following folder: C:\Program Files\Adobe\Flash 9 Public Alpha\en\Configuration\ActionScript 3.0 If we launch the compiler with the -h options, we get to view the help (usage) for this magnificent compiler in the command line. asc {-AS3|-ES|-d|-f|-h|-i|-import |-in |-m|-p}* filespec -AS3 = use the AS3 class based object model for greater performance and better error reporting -ES = use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype properties -d = emit debug info into the bytecode -f = print the flow graph to standard out -h = print this message -i = write intermediate code to the .il file -import = make the packages in the specified file available for import -in = include the specified filename (multiple -in arguments allowed) -m = write the avm+ assembly code to the .il file -p = write parse tree to the .p file -md = emit metadata information into the bytecode -warnings = warn on common actionscript mistakes -strict = treat undeclared variable and method access as errors -sanity = system-independent error/warning output -- appropriate for sanity testing -log = redirect all error output to a logfile -exe = emit an EXE file (projector) -swf classname,width,height[,fps] = emit a SWF file -language = set the language for output strings {EN|FR|DE|IT|ES|JP|KR|CN|TW} -optimize = produced an optimized abc file After a quick survey, we can now compile doing: java -jar asc_authoring.jar -import global.abc -import playerglobal.abc -swf TestGlobal,550,400 TestGlobal.as You’ll surely have noticed that we need 2 files with the .abc extension which are, roughly, precompiled files of the different native classes available in the player. It’s there we reach the interesting part, if we’d like to know the structure of the .abc files, we can ask the compiler to give us the file with the .il extension (using the -m option) which contains your code in “intermediate language”; let’s try it: java -jar asc_authoring.jar -import global.abc -import playerglobal.abc -m -swf TestGlobal,550,400 TestGlobal.as We get a magnificent TestGlobal.il file, and its content is: [[http://iteratif.free.fr/archives/TestGlobal.il|TestGlobal.il]] I leave you to discover the other parameters of the compiler which will evoke more than 1 thumbs up… You find comments here : [[http://iteratif.free.fr/blog/index.php?2005/10/26/11-le-compilateur-as3-de-macromedia|Compiler Flash 9]] Thank you at [[http://www.itworkz.be|Sven Dens]] for the translation