31 May 2005 tnt   » (Master)

Open Source and Flash
I've been getting into the Flash world lately. Although Flash is basically a proprietry environment (that Macromedia did a good job of getting onto almost every browser in the world), there seems to be an open source tool set developing for it. ( If you build it, we will come :-) )

Typically, one develops Flash web applications, by using Macromedia's tool called "Flash". It is a GUI editor for building Flash Animations -- SWF files -- that lets you use drag & drop style developing, and lets you do programming through an ECMAScript based language called ActionScript. This might remind you a little of tools like VisualBasic and Delphi. Although, Macromedia's tool is designed more for artists, and is made to be "usable" and geared for them. It does this by using the conceptual model of -- making you think in terms of -- a timeline, clips, etc instead of windows, buttons, menus, etc. (Which is probably why so many artists I know just love this tool.) (I've never actually used it myself. But I've seen others use it.)

Although Macromedia's Flash software comes with a (commerical and proprietry) ActionScript (command line) compiler. There is now an open source ActionScript compiler called MTASC. One of the best things about it (besides the fact that it is open source software) is that it is much much faster than Macromedia's ActionScript compiler! (Just to get rid of any confusion I think some people might be having right now, reading this, these ActionScript compilers compile ActionScript code into SWF files. Not into native code. I.e., not into .exe's or elf files, or whatever the native code format on you system is.)

The open source Flash world seems to be "coming together" now, under the umbrella of OSFlash.org. The open source Flash community is "living" within its mailing list (and on the Wiki on the website). (If you're interested in the open source Flash world at all, go and join the OSFlash mailing list.) This site and mailing list actually was born of all the "off topic" posts on the MTASC mailing list. (There was clearly a need for OSFlash.)

Another interesting open source Flash tool is swfmill. The desription of it from its website says:

swfmill is a tool to process Shockwave Flash(TM) (SWF) files. It can convert SWF from and to an XML-dialect called "swfml", which is closely modeled after the SWF file format.

Apart from this xml2swf and swf2xml functionality, it also provides a libxslt-based XSL transformator that supports an extension ("swft") which helps with generating IDs for SWF objects and can import an SWF as XML using an XPath command (swft:document()).

The interesting part to me is that it lets you create Flash animations (SWF files) via an XML markup language.

To understand why swfmill is important, I should point out that, when making your Flash animation -- SWF file -- you can NOT accomplish and do everything in ActionScript (no matter how much you want to). There are some things that can only be accomplished via the Macromedia's Flash GUI tool.

This is probably somewhat frustrating to people coming at Flash from and Computer Science and software engineering background. (For me, my development tool of choice is nano. I can't stand IDE's and GUI tools. They just get in my way, and slow me down.)

Besides swfmill giving you another paradigm to do Flash development. swfmill also fills in the missing pieces of doing Flash development (using only open source tools) when using MTASC. (swfmill can basically be used to replace Macromedia GUI Flash tool. Although artists might not like this... since swfmill is NOT a GUI tool... but those who like to development they I do development will probably like it. It's like hand coding HTML.)

I'm working on developing (or encouraging others to develop) an open source RTMP server. Right now, I'm trying to understand the AMF data format (used in .sol files and for Flash remoting). It's been suggested that RTMP uses this format somehow. So learning this should help in reverse engineering the protocol. As of this writing, the AMF Specification is NOT done yet. But, if you want to see the work in progress document, it is at: AMF @ OSFlash. (Hopefully, I'll have enough free time to see this project through, and be able to produce an open source alternative to Macromedia's Flash Communications Server.)

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!