int xmove = 0; int gogo = 0; float color_g = 54; void setup(){ noCursor(); size(500, 500); background(56, 90, 94); smooth(); strokeWeight(3); frameRate(20); } void mousePressed(){ color_g = random(255); } void draw(){ if(mousePressed) { stroke(255, 80, 50); } else { stroke(50, 200, 80); } ellipse(mouseX, mouseY, mouseY, mouseX); if(gogo == 0){ fill(90, color_g, 94, 7); noStroke(); rect(0,0,width, height); stroke(100, 100, 200); ellipse(xmove, 250, xmove, mouseY); xmove += 10; if(xmove >= width){ gogo = 1; } } else if(gogo == 1){ fill(90, color_g, 94, 7); noStroke(); rect(0,0,width, height); stroke(242, 255, 47); ellipse(xmove, 250, xmove, mouseY); xmove -= 10; if(xmove <= 0){ gogo = 0; } } }