We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Exporting applet question
Page Index Toggle Pages: 1
Exporting applet question (Read 589 times)
Exporting applet question
May 29th, 2009, 2:01am
 
Hi All,
I’m programming a block of png images that can be manipulated using OpenGl and ControlP5 sliders. When I export the application it’s working perfect, but when I do the web applet it is not working, when I try the index.html Safari crash. Am I missing something? the data carpet needs to be inside also de applet?
Thanks a lot for the help
David
Re: Exporting applet question
Reply #1 - May 29th, 2009, 3:27am
 
If the data carpet (?) isn't in the jar file nor on the server where the applet is downloaded, the latter must be signed.
A common error I see is also to use absolute paths like C:\Documents\... in an applet.
Re: Exporting applet question
Reply #2 - Jun 8th, 2009, 10:02am
 
Hi,
I still no have find the solution. What do you recommend me to watch. In the code I’m calling the images like this:

void setup() {
 size(1024, 600, OPENGL);
 smooth();
 controlP5 = new ControlP5(this);
 controlP5.addSlider("alfa",20,255,255,5,5,150,12).setId(1);
 controlP5.addSlider("Corte",0.01,1,1,5,18,150,12).setId(2);
 controlP5.addKnob("frame",0,num,0,10,40,30).setId(3);
 controlP5.addToggle("rotation",false,60,40,30,30).setId(4);
 //noCursor();
 rate = 0.01;
 for (int i = 0; i < num; i++){
   int punto=num-(constrain(i,1,num));
   ima [i] = loadImage("CalleCoche "+ nf(punto,3)+".png");

   thePlane [i] = new plane ();
 }

 frameRate(90);
 rectMode(CENTER);
 // funciones de las teclas
 marco       = false;
 plano       = false;

 mar = 0;
 rotx = 0;
 roty = 0;
 z = 0;

}

The application is working normally, is the applet what isn't working. I’m in a Mac with leopard and Processing 1.0.3
Thanks a lot for the help
David
Re: Exporting applet question
Reply #3 - Jun 9th, 2009, 6:29am
 
Not sure, but it might be related to loadImage in applet extremely slow thread.
Also check the images are in the generated .jar file.
Re: Exporting applet question
Reply #4 - Jun 9th, 2009, 10:52am
 
Make sure the images are in a folder called "data" inside the sketch folder before exporting as an Applet. Files in this folder are definitely added to the jar file on export.
Page Index Toggle Pages: 1