PImage woman; String[] myImages = new String[25]; int i = 0; void setup() { for (int i = 0; i < myImages.length; i++) { myImages[i] = "female" + (i+1) + ".jpg"; } size(720, 480); } void draw() { // loading an image woman = loadImage(myImages[i]); // draw the image to the screen image(woman, 0, 0); delay(5000); // i is cycling through the images in linear fashion //i = (i+1)%myImages.length; i = int(random(myImages.length)); }