JavaScript Assignment 16

Simple Animation

Create a simple animation in JavaScript.

  1. Create a basic page using this circle of marbles example page.
  2. Using the setTimeout() method, create an animation on the page that makes an orange marble rotate around the circle by moving the orange marble to the next location in the circle every second.
  3. Here are some examples of setTimeout().

  4. Allow the user to stop the animation by placing the cursor on any marble. (hint: use (clearTimeout()))
  5. Allow the user to restart the animation by removing the cursor from that marble.

Next assignment ... Assignment #17