• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Controls > Animating Scroll Controls

Animating Scroll Controls

The scroll controls on the browser window allow the visitor to scroll up and down or left and right on the page. However, JavaScript can also force the browser window to scroll in any direction. Generally, scrolling the window without the visitor’s consent is bad form, since it can be confusing and disorienting. However, we can use the JavaScript scroll capabilities to give the visitor new scrolling controls.

In this example, we’ll use the JavaScript method to scroll the browser window, but rather than instantly scrolling from point to point, we’ll scroll incrementally, speeding up slowly to a maximum speed and then slowing down as we approach the end point (Figures 7.11, 7.12, and 7.13). This “zoetrope” effect can be quite a crowd pleaser, especially in entertainment Web sites.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint