Here's an example that makes use of an integer variable:
Click on
ClickCounter
to show the example.
The onMouseMove method of the following program provides
even more complex examples of displaying strings and numbers.
Click on
MouseMeter
to show the example.
Basketball: The first attempt
Click on
BasketBall
to show the example.
To make our basketball game a bit more exciting, let's add
something that is clearly missing from our first version -- a
ball. In particular, we would like to change the game so that to
score you have to drag the ball into the basket.
Click on BetterBasketBall to show the
example.