I’ve been thinking about ways in which to use flash within eclipse and had considered using XML Sockets, but after reading the API docs for the SWT Browser I noticed that you can execute javascript functions by calling the execute method (funnily enough), and I already knew about the Flash / Javascript Integration Kit. So I knew i could send messages from java into flash, but how could i get information the other way?
Fortunately I noticed that the SWT browser allows you to listen for changes in the status text, so as a proof of concept I made a little project. Its nothing too exciting, but it shows how you communicate both ways and with a bit more work and some clever serialization I should be able to pass some rudimentary data types back and forth.
If you want to have a play you can download a zip file of the eclipse project here.
You’ll need to make sure the SWT library is on your build path to get it to compile. I’d be interested to hear if anyone has any problems using this, or if anyone makes any interesting additions to the code so we can do more complex java and flash communication within SWT.
Hi Martin,
I was thinking in create an UML tool in Flash and use it within Eclipse and this is a great way to do it, maybe a great addon for ASDT in the future (not a near future).
I did tools for drawing diagrams in Flash so I have part of the work done…other thing is that there’s other things more important before that 😉