PImage back, middle, front, frontest; //, middle, front; float beginX = -30.0; // Initial x-coordinate float targetX; float easing= 0.75; float x; void setup(){ size (550,490); smooth(); back = loadImage("clouds.png"); middle = loadImage("war.png"); frontest = loadImage("joana.png"); } void draw(){ background(0); targetX = mouseX; float distX = -mouseX - x; if (abs(distX) > 1){ x += distX * easing; } image(back,x/8, 0); image (middle, x/6, 0); // image(front, x, -100); image(frontest,x/2, 0); }