// image variable PImage david; int y = 0; int direction = 1; // run once and only once void setup() { size(300,300); // background(255); // load the image david = loadImage("bowie.jpg"); // tinting is NOT optional // tint(gray, alpha) or tint(val1,val2,val3,alpha)l tint(245,124,219); } void draw() { frameRate(60); background(255); // display image (name, x, y, width, height) (in pixels) image(david,20,30+y,50+y,100); y+=direction; // yo line, when your y value is the height of the box turn around if (y > height) { //line (0,50,100,100); direction = -1; } // yo line, when your y value is less than zero, turn around if (y < 0) { //line (0,50,100,100); direction = 1; } }