xxxxxxxxxx
20
var button;
var x;
function setup() {
createCanvas(400, 400);
x = 10;
button = createButton("YooooLOO");
button.position(10,10);
button.mousePressed(theyPressedMe);
}
function draw() {
background(220);
}
function theyPressedMe(){
print("Hey");
x = x + 10;
button.position(x,10);
}