Use the following statements to complete the code in Figure 12.32 to animate an image called water-balloon.png falling down.
a.
b. var myCanvas = document.getElementById("gameCanvas");
var myContext = myCanvas.getContext("2d");
c. var balloon = new Image();
balloon.src = "images/water-balloon.png";
d. var y = 0;
e. main();
f. balloon.onload = function () {
startGame();
};
g. updateGame();
h. window.requestAnimationFrame(drawGame);
i. y += 2;
j. window.setTimeout(updateGame, 33);
k. myContext.clearRect(0, 0, myCanvas.width, myCanvas.height);
l. myContext.drawImage(balloon, 300, y);
m. window.requestAnimationFrame(drawGame);
a. between lines 7 and 9
b. between lines 9 and 11
c. between lines 9 and 11
d. between lines 9 and 11
e. before line 11
f. between lines 12 and 13 in main ()
g. between lines 16 and 17
h. between lines 16 and 17 but after the statement (g)
i. between lines 20 and 21
j. between lines 20 and 21 but after statement (i)
k. myContext.clearRect (0, 0, myCanvas.width, myCanvas.height); between lines 24 and 25
l. between lines 24 and 25 but after statement (k)
m. between lines 24 and 25 but as the last statement inside Game () function
You might also like to view...
A user's workstation is experiencing multiple errors when trying to open programs. Which of the following log files should the technician review to assist in troubleshooting these errors?
A. History Log B. Application Log C. System Log D. Security Log
The following statement defines a struct houseType with a total of ____________________ member(s).struct houseType{ string style; int numOfBedrooms; int numOfBathrooms; int numOfCarsGarage; int yearBuilt;};
Fill in the blank(s) with the appropriate word(s).