Skip to main content

The Automate( ) function

automate() is a small function that runs the slideshow by performing the following three operations:

Simulates an onMouseOut event to cause the currently highlighted image in the slide menu to roll back to the unhighlighted image. This happens with a call to imageSwap().

Advances to the next slide with a call to changeSlide().

Simulates an onMouseOver event to cause the next unhighlighted image in the slide menu to rollover to the highlighted images. This happens with a call to imageSwap(). Here are lines 200-204.

function automate() {
  imageSwap(slideShow[curSlide].name, curSlide, false);
  imageSwap(slideShow[curSlide].name, curSlide, true);

Congratulations! You've now reached the end of this section. You can go back to any topic by selecting it from the menu at the left-hand side of the page, or return to the home page for the Unit by clicking on the HN Computing logo at the top left-hand side.