HTML and CSS Reference
In-Depth Information
Function
Invoked By / Called By
Calls
drawtoken
drawall using draw method for the token object in the
everything array
getkeyAndMove using the moveit method for mypent
movetoken
intersect
drawAline
drawall using draw method for Wall objects in the
everything array
startwall
Invoked by action of an addEventListener call in init drawall
stretchwall
Invoked by action of an addEventListener call in init drawall
finish
Invoked by action of an addEventListener call in init
getkeyAndMove
Invoked by action of an addEventListener call in init movetoken using the
moveit method for mypent
savewalls
Invoked by action of onSubmit for the sf form
getwalls
Invoked by action of onSubmit for the gf form
drawall
Table 7-3 shows the complete code for the maze application, with comments.
Table 7-3 . Complete Code for the All-in-one Maze Application
Code
Explanation
<html>
Opening html tag
<head>
Opening head tag
<title>Build maze & travel maze</title>
Complete title element
<script type="text/javascript">
Opening script tag
var cwidth = 900;
To clear canvas
var cheight = 350;
To clear canvas
var ctx;
To hold canvas context
 
Search WWH ::




Custom Search