PImage[] pix; int frame = 0; void setup(){ size(640, 480); pix = new PImage[7]; for(int i = 0; i<7; i++){ pix[i] = loadImage("Frame "+(i)+".jpg"); }; } void draw(){ image(pix[frame], 0, 0, 640, 480); }; void mousePressed(){ frame++; frame%=7; };