Lightbox-Effekt for Processing-Sketches
In my Processing Sketch gallery I wanted to run processing sketches inline using a lightbox effekt. With the help of jquery and some ajax-blackmagic I generated a script that loads the index.html of the processing export and runs the applet in a lightbox.
If javascript is enabled the original index.html is opened.
to integrate it in a page simply include jquery, the processing.js script and processing.css in a html page. The script also need the deployJava.js from java.com that is also used in the index.html files of an processing applet-export.
<script type="text/javascript" src="http://www.java.com/js/deployJava.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="processing.js"></script>
<link rel="stylesheet" type="text/css" href="processing.css"/>
Then simply link the processing sketch and mark the link with class="processing"
<a class="processing" href="http://yourserver/processing/sketchfolder/">My processing sketch</a>
To see it running click on this Example Link
See also:
calling webservices from mootools, jquery or dojo
processing.js in dashboard widget
Linedemo in processing.js
sketch experiment 7 - osc events