CS 101 Web Construction,
Winter 2008, Instructor: Jeffrey
Horn ASSIGNMENTS
Assignment
6 "JavaScript (with Image Maps)"
- Handed out: Wednesday, November 19, 2008
- Due: End of weekend (Sunday, December 7, 2008), end
of day.
- Goals:
- Create client-side scripts
- Learn basic Javascript
- Create hot spots (clickable areas) on any image
with <map>
- Learn about "event-driven programming" by
assigning Javascript code to the "onclick" attribute
- Details: OPTION I: Find Waldo
-
- Implement a "Find-Waldo" type of game.
- The game should:
- Show the user an image.
- Ask the user/player to find something in the image and
click on it.
- If the user's click is correct, then increase the
score. If incorrect, do not increase score.
- You must have at least TWO somethings ("Waldos") that
the user can click on.
- Score should cumulative and displayed.
- Help:
-
Example Code
- ISMAP Attribute: To help you find out the
coordinates of items in your image, use the ismap
attribute in your img element. This allows you to see
the coordinates of your mouse!
Try it here.
- Grading Guidelines: OPTION I (Find
Waldo)
- For approx. "C": make an effort!
- For approx. "B": a game that actually WORKS! (as specified in
"Details" above).
- For approx. "A": one or more "enhancements", such as...
-
Two or more images each with one or
more "Waldos".
-
Use of the "poly" shape.
(See
here
for info on shapes like poly, circle, and rect.. Look under the
"optional attributes", in particular the attributes "coords" and
"shape".)
-
other ideas
(get approval from me, Jeff, first!)
- I will grade this one solely on the basis of functionality
(i.e., does it work?)
- Details: OPTION II:
Graphically Filling out a Form (discussed in class)
- Turn-in Procedure: Upload to web. Send
me URL:
- by direct email (no extra credit), or
- via the assignment submission form
here (some extra
credit), or
- use your own form from A5 (for the most extra credit).