CompSci 4 - Classwork - Oct 12, 2006
10 pts
Today's classwork goes along with Chapter 5, Section 1.
You will be writing event handlers.
The following work needs to be checked off when you have completed it.
- Create a new space world with a spider robot (from scifi folder)
and two two-button switches (from the controls folder).
- Place the two-button switches one on top of the other and change the
look of them so that all the buttons are unique. For example, you might
want
to change a red button to a blue button (in color and in name also).
- One button (when clicked with the mouse) should make the robot
walk forward, and one button should make the robot walk backward. A few legs
should move.
- Create two other things the robot can do by writing two methods
and link them to the other
two buttons.
- Create another event for when the user presses the "I" button,
then instructions appear (3-D text) for a few seconds that tell the user to
which buttons make the robot move and how, such as "Click on:
red - walks forward, blue - walks backward," etc ..
forward, etc."
If you finish early, feel free to embelish your animations.