//if2.pde void setup() { size( 500, 500 ); smooth(); } void draw() { if ( mouseX < 100 ) { background( 255, 0, 0 ); } else if ( mouseX < 200 ) { background( 0, 0, 255 ); } else { background(0, 255, 0); } }