HAXE Flash9 Assembler Library and Compiling SWF


Haxe
is a very interesting project that is a scripting language that can create SWF for Flash.

Haxe has now added Flash9 Assembler library called hxASM and released version 1.1.4 that includes performance updates for Flash9 SWFs compiled using Haxe scripting.

I have to compile SWFs dynamically right now in a service and this is a very attractive solution with the new version and the performance improvements. Previously there was some slow down and only static content really worked well but if this is equal or a 30% improvement that is excellent.

Flex 2 can also compile at the command line you can compile flash9 swf with or without the flex2 libraries, when using mxml the flex libraries are included which add 100k or so minimum. It is not required to compile with flex 2 libraries though.

Flex 2 command compiler options

Haxe command compiler tutorial

Using Haxe with Flex 2

Using Haxe hxASM

Full Haxe API (includes all flash libraries)

Advertisements

6 Responses to “HAXE Flash9 Assembler Library and Compiling SWF”

  1. Theo Says:

    The Flex compiler (mxmlc) doesn’t add anything from the Flex libraries unless you compile a .mxml (which is always a Flex subclass). Compile a .as with a subclass of Sprite instead and you don’t get anything besides what you reference (the flash packages are not included in the .swf).

  2. drawk Says:

    Thanks Theo, yeh I didn’t make that clear I corrected the post.

  3. sascha/hdrs Says:

    Was excited to try this out but seems nothing works. After compiled the example on the hxasm page I get a strange exception …

    VerifyError: Error #1107: The ABC data is corrupt, attempt to read out of bounds.
    at
    at [abc-decode]

  4. Nicolas Says:

    Hi sascha, that’s because you’re using Flash Player Beta 9r60, try to use latest non-beta player. 9r60 will be supported in next haXe release.

  5. drawk Says:

    Here is a flash version switcher:

    http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php

    Many times if I have issues with something in one version of the flash player I check the last version or the new beta to see if it is broken or fixed.

  6. sascha/hdrs Says:

    Ah thanks for the hint! would have never thought about that!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: