|
||
| Inside Technique : Animated Page Sets : Using Page Sets The pageList object (returned to the p1 variable in the prior example) exposes methods for switching pages. Each page switch supports an optional animation for the exiting page and the entering page. The following three methods are exposed on the pageList object to switch pages:
In the
demonstrationIE4, NS4,
we created a set of buttons for navigating between pages. Below
represents three of those buttons: one that goes to the third page, another that automatically moves to the next page, and a third button that moves
to the previous page. The next and previous page buttons cycle so requesting the page after the last page takes you back to the first page.
Notice that the outgoing and incoming animations are specified with a constant. We use constants to track the animations. This makes it easy to later extend the library with more types of animations. The following animations are currently supported.
The library was designed to be used with minimal intervention by the author. Our intent was to allow an author to create a set of DIV's when used with the library turned into a set of animated pages. While we were successful with this approach for Internet Explorer, translating this to Netscape Navigator proved to be a challenge. On the next page, we explain the issues and solutions we found for making this library work cross-browser. Page 1:Animated Page Sets © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |