MMDT1022 HTML II and Javascript
Week 9


Week 9

This week we explore time functions, displaying/hiding layers and moving layers.

Example of the bug following the cursor.Lady BugRewritten followbug.

Bug going to random set points on the screen.

Example of a car moving on the screen. car

Resized car.   Background board (small) board (large)

W3Schools on timer functions.


Lab Move Layers

For this lab you need to turn in two exercises:

Exercise move bug

1 - Start out with the exercise that we did in class with the bug moving around on the page that followed the cursor. 5pts.

2- Change the javascript so that instead of the bug following the cursor, the bug appears to go to random points on the screen per the example shown above in class. The animation needs to appear smooth. Also the bug needs to stay in the browser window (even if the browser window is shrunk). Total of 5 pts.

Exercise move car

3- Finish the car moving exercise so that it stops at every square on the board. Stopping where we stopped in class 3 pts. Finishing exercise so that the car stops at every square on the board 2pts.

Grading Criteria Points
15
Part 1 as described above. 5
Part 2 as described above. 5
Part 3 as described above. 5

Lab is due one instructional week from when it was assigned.  50% penalty if late.