The Essential Guide to HTML5

(Greg DeLong) #1

INDEX


application state
craps game sample and, 24
Hangman game sample and, 295, 300
applications
ballistics simulation. See ballistics
simulation
building in stages, 38, 66
examples of. See samples
multilingual, 284
samples in this book, downloading, 100
terminology and, 214
arcs, drawing, 70, 32–38
arguments, 11, 26, 76
array of arrays
audio and, 274
memory game sample and, 147
quiz sample and, 184–186, 193
rock-paper-scissors game rules and, 267
array splice, 110
arrays, 73–75, 101
everything array and, 101, 103
gradients and, 74
Hangman game word list and, 295
one-dimensional vs. multi-dimensional, 185
arrow keys, responding to, 218, 219, 220
article element, 7, 187
aspect ratio, 72
assignment statements, 26
attributes, 324
audio
for rock-paper-scissors game sample, 259,
272–274, 283
support for, 128
audio element, 272


B
bad/invalid input, 69, 79, 96
ball (sample), illustrating ballistics simulation, 97
Ball function, 102
for cannonball sample, 103, 111, 118
for slingshot sample, 129
ballboundx/ballboundy variables, bouncing ball
sample and, 78
ballistics simulation, 97–140
ball sample illustrating, 97
cannonball sample and, 97, 111–128
slingshot sample and, 98, 107–111, 128–140


ballrad (sample) variable, 78
ballvx/ballvy variables, bouncing ball sample
and, 78
ballx/bally variables, bouncing ball sample and,
78
beats array, rock-paper-scissors game sample
and, 268, 284
best practices
for comments, 81, 221
for functions, 80
blackjack card game (sample), 317–346
building, 330–346
cards for, 323
customizing, 346
d key in to deal new card, 319, 329, 346
h key in to hold, 319, 329, 346
n key in to start new game, 318, 320, 327,
329
rules of the game, 317
testing/uploading, 346
body element, 4, 8
canvas and, 30
for quiz sample, 189, 193
rock-paper-scissors game sample score
and, 268
Boolean values, 27
borders, 8
bouncing ball (sample), 67–96
in 2-D box, 67, 80–85
ball replaced with image, 67, 71, 85–91
ballboundx/ballboundy variables and, 78
ballvx/ballvy variables and, 78
ballx/bally variables and, 78
customizing, 95
function calls for, 80
inboxboundx/inboxboundy variables and, 78
input validation for, 67, 91–95
moveball function and, 76, 77
testing/uploading, 96
br singleton tag, 6
break statement, 29
browsers, 1
audio/video support and, 128, 184, 272
event handling and, 265
form input validation and, 79
keystroke capture and, 220, 328
local storage and, 224, 226
mouse event implementation and, 108, 153
Free download pdf