SWF Machine: generating SWF binary from Erlang

March 17, 2010

SWF Machine is an Erlang program I’ve been writing, to generate SWF files from Erlang. This program takes a custom instruction set as input and generates SWF binary instructions, which once saved in an SWF file can be run in the Flash Player, here’s a quick demo of SWFMachine in action …

A similar attempt by Takashi Yamamiya and the eswf library on google code were quite helpful in getting me started, so thanks to them for sharing.

3 Responses - What do you think?

  1. Instead I write an ActionScript Class on the server side in a “txt” file with all the dynamic links and variable set, then I rename the file to “.as” and pass it to the MXMLC for the “.swf” gen.

  2. Brett,

    Sure, you can always do it that way ;)

    But, there’s a difference … SWFMachine hasn’t learned to write actionscript bytecode (ABC) yet .. it only deals with SWF instructions .. this is more akin to drawing a shape in Flash Professional than say compiling an AS3 class using MXMLC … the advantage of SWF instruction is that the SWF output obtained is much smaller compared to packaging ABC, also I think SWF instructions would execute much faster on the client than ABC … but the disadvantage is that SWF instructions are hard coded information .. ABC on the other hand is logic that can execute and make choices etc.

    Also, if the task is to dynamically generate swfs on the server, MXMLC is way too slow for that in my opinion.

    Thanks,
    Mrinal

  3. This is neat! You are really having a good time with Erlang + Actionscript :)

Your thoughts or questions: