Aug 25, 2008 0
Processing Hearts AIR While Merapi Lends a Hand
As promised at my brief demo at 360|Flex San Jose last week, I’m now releasing the Merapi library for Processing.
Processing is a Java-variant built mostly for artists or for anyone who wants to create quick prototypes.
Merapi is an opensource Java library that gives access to Java from AIR – Adobe’s own OS-agnostic runtime (for the desktop, not a browser plugin) built around the Flash Player.
But most of you already knew that.
It’s really nothing too complicated (just wrapping the JAR file correctly), but it will make it a bit easier for you to get started with Merapi in Processing.
What to do:
1) Download Merapi Processing Lib Beta – Merapi is not being publicly released yet.
2) Wherever your actual Processing binary resides, you will find a folder called “libraries”. Unzip merapi.zip into this directory. (Your directory structure should be {ProcessingDir}/libraries/merapi/library/… which will contain all the necessary JAR files for Merapi.)
3) Open your Processing IDE (restart if it’s already open), go to the Menu->Sketch->Import Library->merapi. This will import the necessary packages, but there’s one last step before you’re in the clear. The way that Processing imports all of the packages becomes a bit troublesome. If you simply try to create an instance of the Merapi “Bridge” class, you will get a compile error. To resolve this… (See Step 4)
4) Change the import line import merapi.*” to “import merapi.Bridge;”
Also, Adam Flater whipped up this quick video demonstrating the Lego Mindstorm robot cruising around thanks to Bluetooth<->Java/Merapi<->AIR.