ControlP5 applet not working?
in
Contributed Library Questions
•
16 days ago
Hi,
I wanted to upload a Java sketch to openprocessing.org, using "Export applet" in Processing 1.5.1 (it's not possible anymore with the newer versions).
Having tried the newest version of ControlP5 as well as some older ones, none of them works when exported as an applet. The applet window remains just plain white. I can import the library and declare the instances of ControlP5 objects, but as soon as I call "cp5 = new ControlP5(this);" in draw(), the error occurs.
Also I was following the advise to make all functions and variables public that are used by ControlP5, but it's still no use.
Is there some problem with ControlP5 and applets? Some other sketches using ControlP5 I've seen worked quite well, though not all of them.
Here's a simple code that "should" work, if it works:
- import controlP5.*;
- public ControlP5 cp5;
- void setup() {
- size(400,400);
- cp5 = new ControlP5(this);
- }
- void draw() {
- background(0);
- fill(255);
- ellipse(width/2,height/2,20,20);
- }
1