jbt
YaBB Newbies
Offline
Posts: 22
Re: Running processing applications within Quartz
Reply #7 - Mar 27th , 2009, 3:33am
Here is the code for the page (includes php and html) <?php $applets = array('info1' => array ( 'archive' => 'applet1.jar', 'classid' => 'applet1.class', 'author'=> 'Author2', 'title' => 'Demonstration 1), 'info2' => array ( 'archive' => 'applet2.jar' , 'classid' => 'applet2.class', 'author'=>'Author2', 'title' => 'Demonstration 2'), 'info3' => array ( 'archive' => 'applet3.jar' , 'classid' => 'applet3.class', 'author'=>'Author3', 'title' => 'Demonstration 3')); $keys = array_keys($applets); $nth = array_rand($keys, 1); $key = $keys[$nth]; $mychoice = $applets[$key]; $archive = 'applets/' . $key . '/' . $mychoice['archive']; $archive = preg_replace('/\,/',",applets/$key/",$archive); $classid = 'java:' . $mychoice['classid']; ?> <html> <head> <meta http-equiv="refresh" content="30"> <title>Interaction Design 2009</title> </head> <body bgcolor="#000000"> <p> </p> <center> <object classid="<?php echo $classid;?>" type="application/x-java-applet" archive="<?php echo $archive;?>" width="800" height="600" standby="Loading Processing software..." > <param name="archive" value="<?php echo $archive;?>" /> <param name="mayscript" value="true" /> <param name="scriptable" value="true" /> <param name="image" value="loading.gif" /> <param name="boxmessage" value="Loading Processing software..." /> <param name="boxbgcolor" value="#FFFFFF" /> <param name="test_string" value="outer" /> </object> </center> <p style="align: center; color: white; font-family: sans-serif;"> </body> </html>