Author(s): Jeanine Meyer
Publisher: Apress
Year: 2010
Language: English
Pages: 362
City: New York
Contents......Page 3
Introduction......Page 8
Critical requirements......Page 10
Basic HTML structure and tags......Page 11
JavaScript programming......Page 17
Building the application and making it your own......Page 18
Summary......Page 26
Introduction......Page 27
Pseudo-random processing and mathematical expressions......Page 30
Variables and assignment statements......Page 31
Programmer-defined functions......Page 32
Conditional statements: if and switch......Page 33
Drawing on the canvas......Page 35
Building the application and making it your own......Page 44
Throwing a single die......Page 46
Throwing two dice......Page 53
The complete game of craps......Page 61
Summary......Page 71
Introduction......Page 73
Drawing a ball, image, and gradient......Page 76
Building the application and making it your own......Page 86
Summary......Page 102
Introduction......Page 103
Critical requirements......Page 106
Arrays and programmer-defined objects......Page 107
Rotations and translations for drawing......Page 109
Drawing line segments......Page 113
Mouse events for pulling on the slingshot......Page 114
Distance between points......Page 116
Building the application and making it your own......Page 117
Cannonball: with cannon, angle, and speed......Page 124
Slingshot: using a mouse to set parameters of flight......Page 134
Summary......Page 146
Introduction......Page 147
Representing cards......Page 152
Using Date for timing......Page 153
Providing a pause......Page 154
Drawing text......Page 155
Drawing polygons......Page 157
Implementing clicking on a card......Page 158
Preventing certain types of cheating......Page 159
Building the application and making it your own......Page 160
Testing and uploading the application......Page 182
Summary......Page 183
Introduction......Page 184
Critical requirements......Page 188
Storing and retrieving information in arrays......Page 189
Creating HTML during program execution......Page 191
Changing elements by modifying CSS using JavaScript code......Page 194
Text feedback using form and input elements......Page 195
Presenting video......Page 196
Building the application and making it your own......Page 198
Summary......Page 215
Introduction......Page 217
Critical requirements......Page 222
Mouse events to build and position a wall......Page 223
Detecting the arrow keys......Page 224
Collision detection: token and any wall......Page 226
Using local storage......Page 228
Encoding data for local storage......Page 234
Radio buttons......Page 235
Building the application and making it your own......Page 236
Creating the second maze application......Page 250
Summary......Page 261
Introduction......Page 263
Critical requirements......Page 266
Providing graphical buttons for the player......Page 267
Generating the computer move......Page 271
Starting off......Page 278
Building the application and making it your own......Page 279
Testing and uploading the application......Page 288
Summary......Page 289
Introduction......Page 290
Storing a word list as an array defined in an external script file......Page 298
Generating and positioning HTML markup, then making the markup be buttons, and then disabling the buttons......Page 299
Creating progressive drawings on a canvas......Page 301
Maintaining the game state and determining a win or loss......Page 303
Checking a guess and revealing letters in the secret word by setting textContent......Page 304
Building the application and making it your own......Page 305
Summary......Page 318
Introduction......Page 320
Critical requirements......Page 325
HTML5, CSS, and JavaScript features......Page 326
Building the application and making it your own......Page 333
Summary......Page 349
Numbers......Page 350
B......Page 351
C......Page 352
D......Page 353
F......Page 354
H......Page 355
I......Page 356
K......Page 357
O......Page 358
R......Page 359
S......Page 360
T......Page 361
Z......Page 362