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 <filename>|-in <filename>|-m|-p}* filespec
specified file available for import
(multiple -in arguments allowed)
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:
I leave you to discover the other parameters of the compiler which will evoke more than 1 thumbs up…
You find comments here : Compiler Flash 9
Thank you at Sven Dens for the translation