/*************************************** 2008.3.29 Dongyoon Park cre8ive.park@gmail.com http://www.cre8ive.kr ****************************************/ void setup() { size(550,350); // set screen size. background(0); // set background color. } // declare and initialize variables. int xspeed=10, yspeed=10; int x=0, y=0; void draw() { PImage myimage; myimage = loadImage("Greece.gif"); x = x + xspeed; y = y + yspeed; // screen boundary check if( (x < 0) || (x > width-50) ) xspeed = -xspeed; if( (y < 0) || (y > height-50) ) yspeed = -yspeed; background(0); image(myimage, x, y); }