SMIL is a markup language similar to SVG and has been a W3C recommendation since 1998. It allows various animation effects of SVG objects.
This page animates single objects, and introduces user interaction in Example 1. By clicking 'GO' the user starts the animation - clicking 'STOP' ends the animation.
Example 2 uses 'animate' to move a rectangle up and down vertically. The 'values' attribute specifies what values to use for the 'attributeName', which in this case is the y axis. So it begin at 220 pixels, moves to 0 pixels, and finishes back at 220 pixels. Since the 'dur' (duration) is set to 1 second, the bar will reach halfway in its animation after 1 second.
Moving on to Example 3 demonstrates moving a rectangle back and forth horizontally over the course of 4 seconds.
Finally Example 4 shows a similar animation as Example 3, except for timing. The purple circle takes 3 seconds to complete its travel, while the gold rectangle takes 4 seconds.
A note about layers:
SVG uses the painter's model for layers. This means that the last item added will appear on
top of items added earlier. This is very noticeable on this page in Examples 2,3, and 4. The
code for the text appears AFTER the code to generate the objects, so is 'higher' than the images.
This results in the text being visible even when an image appears to pass in front of the text.
All done.