hi, what you encounter is java security issues. see a working demo of using sliders in an applet
here. the following is copied from the library page:
"export to applet. since the security regulations for applets are very high and strict, you need to make fields and functions that you control with controlP5
public in your code."
Code:
import controlP5.*;
ControlP5 controlP5;
int myColorBackground = color(0,0,0);
public int sliderValue = 100;
void setup() {
size(400,400);
controlP5 = new ControlP5(this);
controlP5.addSlider("slider",100,167,128,100,160,10,100);
controlP5.addSlider("sliderValue",0,255,12,200,200,10,100);
}
void draw() {
background(myColorBackground);
fill(sliderValue);
rect(0,0,width,100);
}
public void slider(float theColor) {
myColorBackground = color(theColor);
println("a slider event. setting background to "+theColor);
}
hope this makes the sliders work for you.
best,
andreas