Generating Flash in Java

[email protected] Tue, 25 Jul 2006 15:01:37 -0500 (CDT)
Newsgroups gmane.comp.java.jgenerator.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.

--bound1153857697
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I've seen this discussed in several places and looked at the JavaDocs about it, but I'm trying to figure out how to programmatically generate an SWF file directly from the Java objects.  This is what I have so far:

package test;

import java.awt.geom.*;
import java.io.*;

import com.iv.flash.api.*;
import com.iv.flash.api.text.*;
import com.iv.flash.util.*;

public class TestJGenerator {
	public static void main(String[] args) throws Exception {
		Script script = new Script(1);
		script.setMain();

		FlashFile ff = FlashFile.newFlashFile();
		ff.setMainScript(script);

		Frame frame = script.newFrame();

		Text text = Text.newText();
		TextItem item = new TextItem("Hello World", null, 36 * 20, AlphaColor.red);
		text.addTextItem(item);
		text.setBounds(0, 0, 100 * 20, 100 * 20);
		frame.addInstance(text, 1, new AffineTransform(), null);

		FlashOutput output = ff.generate();
		BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File("example.swf")));
		bos.write(output.getBuf(), 0, output.getSize());
		bos.flush();
		bos.close();
	}
}

It renders without errors but the page is entirely blank.  Could I get a reference to some resources on learning how to do this or could someone correct whatever I'm doing wrong here?

Thank you,

Matt

--bound1153857697
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--bound1153857697
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Jgen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jgen-devel

--bound1153857697--