More events

The user clicking on a button is common event, but the computer can recognize and act upon many types of event. For example, when you roll the mouse over this picture:

a blue car is displayed, and when you roll it off the picture, a red car is displayed.

This example illustrates two events: the user rolling the mouse over the picture and the user rolling it back off. The programmer had to write an event handler subprogram for each of these events:

  1. on MouseOver event: display a picture of a blue car
  2. on MouseOut event: display a picture of a red car

Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.