PDA

View Full Version : How to generate an SWF from JAVA


TrinityFlasher
12-26-2008, 09:52 AM
Hi Guys!
I'm wondering if it's possible from a java class generate an SWF file with customized action script code included.

I need it for an university project. In this project I have to create a language and recognize it with a parser developed in JFlex and Cup.

For instance, I have an XML file that define a WEB image gallery and I have to parser this file and then I would like to generate an swf file that manage this gallery.

So, I have no problem to write the action script code, the problem is how to create an swf file from a java class with my own action script code.

Sorry for my bad english.

Thanks in advance.
TF

peptobismol
12-30-2008, 04:19 AM
Why go through all this trouble?

I think the number one rule is to keep things simple.. If you think about it, I'm sure you can come up with a simpler and elegant solution.

I'll start you off with a simple idea.
The XML file will be parsed by a pre-made flash application...
like this
http://slideshowpro.net/

TrinityFlasher
01-01-2009, 09:13 PM
That's right but I need it for an university project. My course is labeled "Compilers and Automata Theory", so it's complicated , I have to create a programming language and then I have to parser it with JFLEX (lexical analyzer - http://www.cs.princeton.edu/~appel/modern/java/JLex/ ) and CUP (parser - http://www.cs.princeton.edu/~appel/modern/java/CUP/manual.html ). Finally I have to traslate it in another language like assembler, c, java.
Overall I can't show a "simple" project to pass the exam!

Hower thanks for the answer and Happy new year!

TF

mattb
01-16-2009, 09:38 PM
You could just use one of the Adobe compilers (COMPC or MXMLC I think) to build an SWF from the AS source files. These tools are available as a free download in the Flex SDK and are written in Java so you can use them cross-platform.