HTML and CSS Reference
In-Depth Information
Code
Explanation
}
Close clause
var i;
Used for indexing over the different symbols
for (i=0;i<everything.length;i++){
For header for indexing over the elements in
the everything array, namely the three
symbols
var ch = everything[i];
Get the ith element
if
((mx>ch.sx)&&(mx<ch.sx+ch
.bwidth)&&(my>ch.sy)&&(my<ch.sy+ch.bheight))
{
Check if the mx, my position is within the
bounds (the outer rectangle bounds) for this
symbol
drawall();
If so, invoke the drawall function, which will
erase everything and then draw everything in
the everything array
size = 15;
Initial size of computer-move image
tid = setInterval
(flyin,100);
Set up timed event
result
=
beats
Set the result message. See the section
below the table for the addition for audio.
[compch][i];
newscore
=
Get the current score, converted to a number
Number(document.f.score.value);
newscore
+=
Add the adjustment and save to be displayed
later
points[compch][i];
break;
Leave the for loop
}
End the if clause
}
End the for loop
}
End the function
function flyin() {
Header for the function handling the timed
interval event
Search WWH ::




Custom Search