int x = 0; float a=random(0,255); float b=random(0,255); float c=random(0,255); void setup() { size(600,600); background(0); strokeWeight(3); frameRate(10); } void draw() { background(0); stroke(a,b,c); fill(0); rect(200+x,200+x,200-x,200-x); a=random(0,255); b=random(0,255); c=random(0,255); if(mouseY>300){ x=x+3; }if(mouseY<300){ x=x-3; } }