Devlogs
Recently I have had to implement exporting PPT files directly form flex application. Looking for possible solutions I have found one that uses Java applet. The idea was to use Java Applet as a 'worker' for Flex application.
Applet should be run in background, without any visual components. After starting applet just creates server socket on a local machine and binds to one of high ports (eq.8080). In Flex we can use flash.net.Socket or flash.net.XMLSocket to communicate with applet worker. This allows us to send and receive data to and from applet. Using this solution we can use Java multithreading support to handle all time consuming tasks (eq. generating ppt).
In our company we have successfully implemented this to generate ppt files directly form flex application. In Flex we just generate images and send them to running applet 'worker'. Next 'worker' creates ppt and sends it back to flex.
Moreover applet can be added dynamically to html with use of JQuery and ExternalInterface. This allows us to run worker applet only if it is necessary instead of running it always in backround.
In example presented below user can generate a series of 10 images. You can also use a camera (if present) to capture 10 images. Next using 'Generate PPT' button You can create PPT from a series of those images.
What happens after clicking 'Generate PPT', applet is added to html with use of ExternalInterface (take a look at PrinterPPT.as). At this stage Flex application waits for applet to start server (server will bind to port 10001). Next Flex application will connect with applet using flash.net.Socket and send all images to it. Applet will create PPT file and send it back to Flex application.
Java Runtime has to be installed and JavaScript enabled to use this example
Flash player (ver. 10.0.0) is required to see this content. Please update to newest possible version.
This approach is also used by http://www.screentoaster.com, where users can record screencasts directly from flex application.
This could also be used to create browser Flex compiler. Its because Adobe provides Flex Compiler API for Java. Using this API it is possible to create applet based Flex compiler.
hello,
Could you please attach PPTPrinter.java file.
I think you missed to attached. I got the flex source code.
Thanks,
Ravi
Hi Guys
i am also looking for directions to integrate Flex app and Applet app.....
Can you kindly e-mail the code for doing so
Ankur
Kindly ca you please share the code with me, I am really in need of this from so many days?
I will be very thankful to you for this.
I am trying to implement a flex application that uses an applet for processing, however I am having problems sending information to the applet. I would appreciate it very much if you share your code with me. Thank you in advance.
Hi,
I'm creating an online IDE and I want to use ANTLR generated parser in java applet(java version of parser is really more effective). Could you, please, send me source, which is mentioned in this article? Maybe just some files in which connection between flash and java is implemented...
almost 2 years ago ravi #0
Hi,
This is Exactly what i am searching since many days.
Could you please share the code. Thanks a ton.
Thanks