xxxxxxxxxx
17
var bgcolor;
var button;
function setup() {
createCanvas(400, 400);
bgcolor = color(200,200,200);
button = createButton("Color??");
button.mousePressed(changeColor);
}
function changeColor(){
bgcolor = color(random(255),100,100);
}
function draw() {
background(bgcolor);
}