cash loans
16 October 2008

Dynamic Image Creation with Adobe AIR

We’ve put together a simple AIR application that allows you to load a SWF, select any class, and export a series of PNG or JPEG images. Potential uses for this tool range from photoshop-style batch image creation to randomized image painting ala Erik Natzke.

There’s a built in help section, but here’s a short video that outlines the basic idea:

Since I didn’t include a voiceover for this example, the basic steps involved are:

  1. Export a custom class on an empty symbol.
  2. Write logic to add a text field and draw a circle.
  3. Publish SWF and load into the image encoder.
  4. Create 20 PNG images in the “output” folder on the Desktop.

Extra notes on functionality:

  1. The application attempts to pass in the current serial index to the constructor of the class you’ve chosen. This has a variety of uses, but is especially good for looking up array data, or directly populating a text field (as in the example above).
  2. Even if you don’t declare a constructor parameter, the export will still run just fine. This makes it easy to see what any class will look like as an image, or to export a series of images from a Math.random-based visualization class.

The application is available for download here. If you have any questions or requests, post a comment and I’ll do my best to help out.

posted by Shaun Tinney

thinking about… AIR, AS3, Experiments, Research


  1. Quentin said…

    You should plug that with SwitchBoard or PatchPanel, that’d be even more awesome!

    3:58 am / October 17th, 2008

  2. Jerry Starbuck said…

    This looks very interesting, however, I was unable to get your program to work. I successfully loaded my swf file, and the program found my class file (which draws a simple circle). But pressing the “Run Encoder” button does nothing.
    Could you also post the class file that you used in the video? Thanks in advance!

    8:24 pm / December 22nd, 2008

Have a comment?