The next version of Gnash has the ability to save screenshots in PNG format. You can either do this through a GUI (Ctrl-O) or by specifying frames on the command line. For the command line, there are two new options:
I've taken advantage of Gnash's new screenshot ability and made some screenshots of various movies running in what will become Gnash 0.8.7. See the screenshots here.
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 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.
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.
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 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!
This is a demonstration of a SWF created entirely in ActionScript 3, using only as3compile from the swftools suite.
By clicking on the keyboard, the SWF synthesizes a simple sound and supplies another note that harmonizes with it (though because it has no tonality programmed in, the harmony will sound odd).
The problem of latency here is noticeable: there is a significant gap between clicking on a key and the start of sound playback. Unfortunately the only way of improving this is by reducing the sound quality.
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.
C++ allows you to construct a std::string from a pointer to const char, like this:
std::string s("Hello, world!");
But this particular method has a limitation: even though std::strings can contain the null character, the constructor will only read up to the first null in the byte string.