C++ Development and Consultancy - Open-Source Flash

The FLA format

The Adobe Creative Suite, the most widely-used tool for creating Flash movies, has long used a secret proprietary format known by its extension "fla" to store projects.

These files, if they represent the current state of a project, must contain more than enough information to compile a SWF, but because the format is closed and secret, free software programmes cannot use them.

Pointers and recursive templates

How do you get the 'pointed-to' type in C++?

template<typename T>
struct RemovePointer
    typedef T value_type;

template<typename T>
struct RemovePointer<T*>
    typedef typename RemovePointer<T>::value_type value_type;

What's the point? With a bit of boost magic, you can use pointers transparently in generic code:

Towards Gnash 0.8.6

The release of Gnash 0.8.6 is scheduled for September, though from experience it's not unlikely to become October.

There are no world-shattering changes so far in this release. The interns for Gnash's summerbash contributed some useful text handling improvement. Some new classes are implemented, and there are the usual minor bugfixes, including some very long-standing ones. It was nice finally to get them off the bug tracker after almost two years. Debugging real SWFs can be a time-consuming exercise.

New maintainer for swfmill

swfmill banner

The swfmill project converts between a special dialect of XML and SWF files. As well as being used by many people for linking together existing SWF resources, it also happens to be useful for changing SWF files at the lowest possible level, giving access to every single property and element of the bytecode.

Bazaar plugin for GnashGordon

I wrote a small plugin for Supybot, an IRC bot written in Python, to keep track of the main Gnash repository for our Freenode channel #gnash. The channel bot GnashGordon can show commit log messages, the current status of the repository, and generate diffs. It's now available under the GPL v3 at https://code.launchpad.net/supybot-bzr in - of course - a bzr repository.

There isn't a great demand for this sort of thing, but it seems to be the only such plugin out there, and of course it can be greatly improved if anyone has the time and motivation to do it.

Gnash 0.8.5 released!

Gnash version 0.8.5 has been released. Official release tarballs can be found at http://ftp.gnu.org/pub/gnu/gnash/0.8.5/

There isn't as much major redesigning for this release, but many smaller rewrites and bug fixes that improve Gnash's compatibility. Above all, many more video sites work (up to SWF version 8).

Gnash on OpenSolaris

Gnash running on OpenSolaris

It took about a day to get Gnash built and more or less running on OpenSolaris. Surprisingly few dependencies are missing, but the ones that are (mainly the Boost C++ libraries) aren't that easy to build.

So the packages I needed to build were:

  1. bazaar (for retrieving Gnash trunk)
  2. bjam (for building boost)
  3. boost 1.37
  4. AGG 2.5 (Anti-Grain Geometry renderer)
  5. libgif

Ohloh supports Bazaar

The open-source open measurement project Ohloh has, after over a year of users asking, finally got round to supporting more version control systems (VCS), namely bazaar and mercurial. This is good news, as increasingly large numbers of projects are using these newer distributed VCSs. For Gnash, it means that the code statistics are finally up-to-date again, nine months after switching from CVS to bazaar.


As my old laptop died, I've had to get a replacement. I work mainly via ssh to a quad-core development machine (fast compiling), so wasn't looking for a massively powerful device. I settled on an ASUS eeePC 901GO, partly because my little brother has been using a similar machine for a while and was quite happy with it.

Ming: creating Flash movies 2

Ming can create and manipulate all elements of a Flash movie, including shapes, morphs, and textfields. The simplest example is a shape. We will create a simple shape and show some transformations. This introduces two basic objects: a SWFShape, which represents the original shape, and a SWFDisplayItem. This is used to transform the object after it has been added to the movie. The following code can simply be added to a main function. Don't forget SWFMovie_save() at the end!

/* Declare our variables */
SWFMovie movie;
Syndicate content