tags:

views:

661

answers:

5

I have an application written in java, and I want to add a flash front end to it. The flash front end will run on the same computer as the java app in the stand alone flash player. I need two way communication between the two parts, and have no idea how to even start going about this. I suppose I could open a socket between the two programs, but I feel that there must be an easier way. Is there a nice part of the api in actionscript 3.0 that will allow me to access java methods directly, or will I have to resort to sockets? I am relatively new to flash, by the way, so any good guides would be much appreciated!

Thanks

+5  A: 

AMF is a messaging protocol commonly used to talk between flash and a backend system. There're several Java implementations, but I haven't used any of them so can't tell you which is best.

Flash can also talk plain old XML, SOAP or REST to the backend, so depending on your codebase that might be easier.

Aeon
A: 

MERAPI is a bridge framework for communication between Java and Flash.

Not really relevant yet. It is for AIR applications, still in *private alpha* at the moment, and very unstable.
Stu Thompson
+2  A: 

There is also OpenAMF. It is very mature, stable, simple and lightweight relative to Blaze, Red5 and Granite.

BUT, it is also dated (AMF0 protocol only) and the project is no longer active. Lots of people are still using it out in the wild. And the documentation is borderline non-existent.

Stu Thompson
+1  A: 

Granite DS is a good solution, it will allow you to set up services to communicate not only to POJO's but to EJB3 session beans also. It comes with a GAS code generator for converting your java beans into as3 equivalents and also data push to the client using the gravity side project.

baronDodd
A: 

I agree on Granite DS. It was easy to setup and get going.

I have used it to talk directly with a EJB3 bean communicating with thrift generated objects.