Loading...
Logo
Processing Forum
Hi all,

I uploaded the following working processing sketch today:  http://culturehacking.fm/code/SOM/ (not sized properly at the moment).  

I am trying to embed it into a Wordpress (.org) post but I am having difficulty.  I tried to copy and paste the html from the index page (everything within the first div brackets) and replacing SOM.jar with the full path/SOM.jar but it still doesn't display correctly.  Does anyone have any experience with this?  The html I have currently is this:

<div id="content">
<div id="SOM_container">
<!-- This version plays nicer with older browsers,
but requires JavaScript to be enabled.
http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html -->
<script type="text/javascript"
src="http://www.java.com/js/deployJava.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var attributes = {
code: 'SOM.class',
archive: ' http://culturehacking.fm/code/SOM/SOM.jar',
width: 720,
height: 600,
image: 'loading.gif'
};
var parameters = { };
var version = '1.5';
deployJava.runApplet(attributes, parameters, version);
/* ]]> */
</script>
<noscript> <div>
<!--[if !IE]> -->
<object classid="java:SOM.class"
type="application/x-java-applet"
archive="SOM.jar"
width="720" height="600"
standby="Loading Processing software..." >
<param name="archive" value=" http://culturehacking.fm/code/SOM/SOM.jar" />
<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" />
<!--<![endif]-->
<!-- For more instructions on deployment,
or to update the CAB file listed here, see:
http://java.sun.com/javase/6/webnotes/family-clsid.html
http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
width="720" height="600"
standby="Loading Processing software..." >
<param name="code" value="SOM" />
<param name="archive" value=" http://culturehacking.fm/code/SOM/SOM.jar" />
<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="inner" />
<p>
<strong>
This browser does not have a Java Plug-in.
<br />
<a href="http://www.java.com/getjava" title="Download Java Plug-in">
Get the latest Java Plug-in here.
</a>
</strong>
</p>
</object>
<!--[if !IE]> -->
</object>
<!--<![endif]-->
</div> </noscript>
</div>
<p>
</p>
<p>
Source code: <a href="SOM.pde">SOM</a>
</p>
<p>
Built with <a href="http://processing.org" title="Processing.org">Processing</a>
</p>
</div>

Replies(3)

Already tried that one.  Also didn't work for me.  I followed all the instructions, checked off "use multiple jar.." etc, but when I used the shortcode it displayed nothing.  And there is no documentation to troubleshoot...
EDIT: looking at the difference between your posted code and mine, I think that the problem is that you still have 

Copy code
  1. archive="SOM.jar"
just inside the 

  
<!--[if !IE]> -->

section, and it should be

Copy code
  1. archive=" http://culturehacking.fm/code/SOM/SOM.jar"
based on the rest of your code.

Here is what works for me (copied & pasted from the "export applet" page from the Processing IDE):

Copy code
  1. <p style="border-style:solid">
  2. <!-- This version plays nicer with older browsers,
  3. but requires JavaScript to be enabled.
  4. http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html -->
  5. <script src="http://www.java.com/js/deployJava.js" type="text/javascript"></script>
  6.  <script type="text/javascript">// <![CDATA[
  7.  /* <![CDATA[ */ 
  8.  var attributes = { 
  9.             code: 'sketch_apr26a.class',
  10.             archive: 'http://redrowstudio.com/applets/sketch_apr26a.jar',
  11.             width: 800, 
  12.             height: 800,
  13.           };
  14.           var parameters = { 
  15.             image: 'loading.gif',
  16.             centerimage: 'true',
  17.           };
  18.           var version = '1.5';
  19.           deployJava.runApplet(attributes, parameters, version); 
  20.           /*  */
  21. // ]]></script>
  22. <noscript>
  23. <div>
  24.  <!--[if !IE]> -->
  25. <object classid="java:sketch_apr26a.class"type="application/x-java-applet"archive="http://redrowstudio.com/applets/sketch_apr26a.jar"width="800" height="800"standby="Loading Processing software..." ><param name="archive" value="http://redrowstudio.com/applets/sketch_apr26a.jar" /><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" /><!--<![endif]--><!-- For more instructions on deployment,or to update the CAB file listed here, see:http://java.sun.com/javase/6/webnotes/family-clsid.htmlhttp://java.sun.com/javase/6/webnotes/install/jre/autodownload.html --><object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"width="800" height="800"standby="Loading Processing software..."  ><param name="code" value="sketch_apr26a" /><param name="archive" value="http://redrowstudio.com/applets/sketch_apr26a.jarr" /><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" /> <strong>This browser does not have a Java Plug-in.<a href="http://www.java.com/getjava" title="Download Java Plug-in">Get the latest Java Plug-in here.</a></strong></object>
  26. <!--[if !IE]> -->
  27. </object>
  28. <!--<![endif]--></div>
  29. </noscript>
  30. </p>
And here is the post where the applet is running.