SWT and Flash

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.

Source code searcher

Im writing my first RCP application at the moment and with any new programming challenge im having to do a lot of searching through help files and on the net. As you all know, sometimes an example is worth a 1000 articles, so finding the Koders site has been a real blessing. They even have an eclipse plugin so you dont have to leave home to find out how others are using IWorkbenchWindowActionDelegate. :)

Definitely worth adding to your toolkit.