//Grade 9 Library V4 //Declarations var DuckFace = createObjectPic("duck.bmp"); //Setup function setup(){ DuckFace.x = 200; //These set the start coordinates for the duck DuckFace.y = 300; } //Main Game function engine(){ DuckFace.x = DuckFace.x + 10; //This will make the duck move across the screen. //You can make the speeds change by changing the number. A better idea is to use the built in variable speedx & speedy to //change the direction of the duck whenever you want. Like this: DuckFace.x = DuckFace.x + DuckFace.speedx; //You can change DuckFace.speedx whenever you want, maybe a key press? DuckFace.draw(); } //Mouse Click function onClick(){ } //Key presses function keyPress(key){ //To get key number codes }