To view this content, you need to install Java from java.com

Source code: new_face

Built with Processing


No. 5
moving_face
by paul glennon 2005


Finally, the introduction of a jpeg - my face! And why not make it move from left to right? I tried to work out how to make it stop - but this will require more study.
NB - I moved the 'load image' up into setup as it was too slow in the second part.

//moving_face by paul glennon


int x = -200; // I think this sets the start point out of the stage.
PImage pauly; // confirms image name.
void setup(){ // void means returns no value.
pauly=loadImage("face.jpg");
size(300,200);
background(0);
framerate(7);
}
void draw(){
//pauly=loadImage("face.jpg"); // Moved up to make it quicker.
background(0);
image (pauly,x,20); // displays the image from point (0,0)
x=x+10;
}