JSwiff
JSwiff
flash movies the java way

JSwiff Tutorials

Starting to work with an API like JSwiff can be pretty hard. There is a multitude of API classes and you have no idea which one you need for your purposes. Some simple tutorials can be of great help at the beginning; even though they rarely explain exactly what you need to do, in many cases they show you the right direction.

Common Methods

Two methods are common to all JSwiff tutorials. The main method calls createDocument, which is responsible for the SWF document creation (thus being different in each tutorial), and writeDocument, which writes the document to a SWF file.


  public static void main(String[] args) {
    String fileName      = "tutorial.swf";
    SWFDocument document = createDocument();
    try {
      writeDocument(document, fileName);
    catch (IOException e) {
      System.out.println("An error occured while writing " + fileName + ":");
      e.printStackTrace();
    }
  }

  private static void writeDocument(SWFDocument document, String fileName)
    throws IOException {
    SWFWriter writer = new SWFWriter(document, new FileOutputStream(fileName));
    writer.write();
  }

Tutorials

Hello World!

Generate a simple SWF file containing colored text - a tiny step towards dynamic Flash generation.

start tutorial

Other tutorials

... are being developed