The Essential Guide to HTML5

(Greg DeLong) #1

CANNONBALL AND SL INGSHOT


Function Invoked By / Called By Calls


moveball Invoked by call of the moveit method for the one
Ball object


Picture Invoked directly by code in var statements


drawAnImage Invoked by call of the draw method for a Picture
object


Table 4-4 shows the complete code for the second application, but only the changed lines have
comments.

Table 4-4. The Second Cannonball Application

Code Explanation




Cannonball