/*Drew Cogbill Image 2.2 [computation08]*/ //numFrames is the number of animated frames int numFrames = 11; //Array to hold the animated frames PImage[] images = new PImage[numFrames]; void setup() { size(360, 230); for (int i = 0; i < images.length; i++) { //the nf() function gives us more control over number formatting //we want a int with 3 places, the first value is the int value //the second value is the number of digits String imageName = nf(i, 3) + "muy.jpg"; images[i] = loadImage(imageName); } } void draw() { //The frame and the frame rate are choosen randomly int frame = int(random(0, numFrames)); image(images[frame], 0, 0); frameRate(random(1, 40)); }