warning: Creating default object from empty value in /mnt/web005/a1/00/51694400/htdocs/bwy/public_html/sites/all/modules/i18n/i18ntaxonomy/i18ntaxonomy.pages.inc on line 34.

Moving clouds

A moving version of the Perlin noise clouds. Noise generation is pretty hard on the processor, though Gnash needs only about half as much CPU as the Adobe Flash player for the same result.

Perlin clouds in Gnash

Perlin clouds in Gnash

A rendering of Perlin noise clouds in Gnash 0.8.10dev. See also the SWF with source code, or a moving version.

Perlin clouds

A SWF created using only the following ActionScript (ming dialect). The moon could do with a bit of noise too! A screenshot is also available.

BitmapData = flash.display.BitmapData;

MovieClip.prototype.drawCircle = function(r, x, y) {

   this.moveTo(x + r, y);

   var segments = 8;
   var radians = Math.PI * 2 / segments;

   var a = Math.tan(Math.PI / segments); 

   for (var i = 0; i < segments; ++i) {
      var k = i + 1;
      var endx = r * Math.cos(k * radians);


#include <ming.h>

int main(int argc, char** argv)
    SWFMovie movie;
    SWFShape shape;
    SWFDisplayItem it;
    int red, green, blue, alpha, thickness, x, y, width, height;


    movie = newSWFMovieWithVersion(7);
    SWFMovie_setDimension(movie, 300, 200);
    SWFMovie_setRate (movie, 1.0);

    shape = newSWFShape();

    thickness = 5;
    red = 0x66;
    green = 0x00;
    blue = 0x66;
    alpha = 0xff;
    SWFShape_setLine(shape, thickness, red, green, blue, alpha);

    x = 20;
    y = 30;
    width = 20;

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;

Ming: creating Flash movies 1

Ming is a library with a few utilities for the production of SWF files. It is written in C, but has several wrappers so it can be used with other languages: PHP, python, C++, Ruby and Perl. Ming currently has no GUI, so writing movies with complicated graphics is painstaking, at least until you have developed some generic functions for creating what you need. Still, even without spending time writing your own framework, Ming can create some effective and impressive movies. It also has a useful actionscript compiler for AS2.

Syndicate content