This sketch is created with an older version of Processing,
and doesn't work on browsers anymore.
xxxxxxxxxx
int x = 0;
int direccion = 10;
void setup(){
size(1000, 700);
}
void draw(){
background(0);
fill(255);
smooth();
ellipse(x, height/2, 100, 100);
x = x+direccion;
if (x >= width || x <= 0 ){
direccion = direccion*-1;
}
}