Blogs

Gnash 0.8.7: dynamic gradient fills

Gnash 0.8.7 with dynamic gradients

Since SWF6 it has been possible to generate gradient fills dynamically using ActionScript. Version 0.8.7 of Gnash will have support for these gradients.

The attached screenshot shows them working in Gnash, or see the original code and SWF.

SWF8 added more options to gradient fills. Gnash 0.8.7 does not support these, but it would be possible to add some or all of that support. If you are interested in having this functionality, please contact me!

Gnash 0.8.7: XML parsing

Gnash 0.8.7 comes with memory optimized XML parsing and much improved compatibility.

The XML and XMLNode classes in ActionScript 2 enable parsing and handling of XML trees. Mostly they are used for configuration data or bits of dynamically loaded content. But sometimes - one example is openstreetmap.org's "potlatch" editor - the XML can have thousands of nodes.

Even a simple XML tree with so many nodes has significant memory requirements. We have to store not only the node type, node value and, if appropriate, the node content and attributes, but also links to parent and child nodes.

Gnash 0.8.7: the AS2 Array

Our next release of Gnash, 0.8.7, is due in February, and it comes with plenty of changes. This is the first of a couple of posts explaining what I've been working on since the last release and where you can expect improvements.

The inflexible design we inherited from GameSWF is gradually improving to the point where Gnash almost has a stable API for some of its central classes. You still can't rely on it staying the same, but the better design that's emerging (and the fact that Gnash has a design at all now) means that any changes should be limited.

Gnash on Haiku

Haikuzone reports that Gnash runs quite nicely on the Haiku operating system, an open-source implementation of the defunct operating system BeOS.

Since there is no official Haiku release of the proprietary Adobe Flash player (and quite likely never will be), Gnash is the only way to see some web content for Haiku users.

Gnash in Chrome on Linux

Gnash apparently runs in Google's new(ish) web browser, so for flash-addicts who insist on using Chrome, see rootninja's blog for a howto!

Gnash as a game UI

On gershon's YouTube channel is an an interesting example of Gnash's flexibility (and what you can do with some sideways thinking):

Gnash is used with some lua bindings to render a flash movie inside a 3-D game. This makes it possible to use any SWF as an interactive UI that can be developed and tested outside the game - even in a web browser.

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.

Syndicate content