JavaScript Animations, Part I: Introduction - Doc JavaScript | WebReference

JavaScript Animations, Part I: Introduction - Doc JavaScript

JavaScript Animations, Part I

If you're using a fourth-generation browser, you can't miss the animated images on this page. Watch them move around simultaneously, in straight lines and circles. In this column we'll show you how to animate elements on a page.

Despite many new technologies such as Java, JavaScript, and Dynamic HTML, the Web is still mostly static. After reading this column you'll know how to bring your pages to life with a pre-packaged JavaScript library.

But that's not it. This is only the first in a series of two columns dealing with animations. In this column we'll discuss the animation "engine," as well as two basic paths -- the straight line and the circle. In the next episode we'll cover ellipses, sine curves, and much more, including useful bakward compatible implementations. In this column you'll learn:

  1. How to create an animation object.
  2. How to retrieve the element's left and top properties..
  3. How to set the element's visibility.
  4. How to move the element to a specified position.
  5. How to slide the element.
  6. How to move the element in a circular path.
  7. How to animate the element.
  8. How to define the animated elements and the animations.

At this point you may choose to view the code for the document, as well as the external animation library.

Created: April 21, 1998
Revised: April 21, 1998