Flash 9 AS3 Preview Command Line Compiler

A nice find by the guys at iteratif.free.fr

http://iteratif.free.fr/blog/index.php?2006/08/19/50-le-compilateur-de-flash-9

Or, in English (sort of).

Be careful with that translation – it attempts to translate the code too. i.e. “jar” becomes “gravel”. haha.

I’ll be playing with that when I get a free moment.

This entry was posted in Flash. Bookmark the permalink.

6 Responses to Flash 9 AS3 Preview Command Line Compiler

  1. Not sure if it was mentioned in the french post but this is also part of the Flex 2 SDK. ASC stands for ActionScript Compiler. Pretty sure MXML uses asc behind the scenes to compile ActionScript code. Since Adobe doesn’t provide a shortcut script to ASC, I setup one up by copying the bin/mxmlc script and editing the last line to call asc.jar rather than mxmlc.jar. There are some cool options in ASC I haven’t seen exposed in MXMLC.

  2. kp says:

    Yeah, there are some cool options. I know there are some differences in the way the IDE compiles, compared to mxmlc.exe. For example, the IDE will not parse the [SWF] metadata tag, so you can’t use that in a document class if compiling via the IDE. So I’m wondering if the jar compiler for the two is the same, and mxmlc.exe does the pre-processing on that metadata.

  3. Tom Lee says:

    FWIW, the *nix version of mxmlc.exe is just a shell script that does little more than pass arguments to the jar. So, I would be somewhat surprised if mxmlc.exe did anything the jar doesn’t do.

  4. kp says:

    if so, then that means the IDE’s jar is different than the flex 2 sdk jar.

  5. Sventunus says:

    Hi guys,

    Thought I’d post a “better” 😉 translation for you here.

    Kind regards,
    Sven Dens
    —————————————————————————–

    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:

    If we launch the compiler with the -h options, we get to view the help (usage) for this magnificent compiler in the command line.

    After a quick survey, we can now compile doing:

    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:

    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…

    —————————————————————————–

Leave a Reply