Graphical Window Animation
version 3 by Erik Temple
Section: Playing an Animation
An animation shows each of the figures that we have defined in sequence, at a specified rate of speed, given in frames per second (fps). Animations always play from a reel called "the current reel" which the author should set before invoking the animation:
now the current reel is (name of the reel);
animate the current reel at (number) fps
The "animate..." phrase shows each of the images defined in the current reel, in order, at the given frame rate (a number that specifies the frames per second). For example:
now the current reel is the example reel;
animate the current reel at 5 fps
will display each of the five frames defined in the example reel in sequence, ideally for 1/5 of a second each.
We can also loop through the animation without end (until interrupted; see below). We do this by adding "looping" to the end of the phrase:
animate the current reel at 12 fps, looping
When the final frame of the reel is reached, we begin again with the first frame.