I've never been a fan of Flash for many reasons, and now, with mobile devices, HTML5 and CSS3, there's even less of a need to use it. The purpose of this page is to show that you can add animated elements to your page without the need for Flash.
The first two examples use CSS transitions. The transition property was added in CSS3 and is effectively an entry animation that controls the way in which changes to properties of elements on the page are introduced - e.g. you can change a style property and make the change gradually, like a tween in Flash. My abacus page uses this technique to make the beads slide into position. As this is a new technique, older browsers such as Internet Explorer 9 will just ignore it.
This analogue clock works in a similar way. There is a DIV for the clock (sized at 50% so that it scales with the page) that has the face as its background. Inside that DIV are three further DIVs with the hour, minute and second hands as their backgrounds. These DIVs are positioned absolutely so that they are stacked on top of each other, and the z-index property ensures that they stack with the hands in the right order.
Again, you can view the source to see exactly how the clock works.
I've created a third example on a separate page - the sort of thing that students create in Flash for their DiDA/Nationals coursework. Make sure that you have a newish browser (e.g. Internet Explorer 11 or a later version of Chrome) and click here.
The Mozilla web-site includes an example of a clock animated using canvas.
setTimeout() is used when you want to run a function a certain number of milliseconds into the future, effectively creating a delay. It's useful to one-off delays or where the frequency isn't fixed - e.g. in my Simon and traffic light examples.
setInterval() is used where you'd like to call the same function repeatedly with a fixed frequency, e.g. every second. The clock examples on the current page use this technique, as does my seven-segment display example. I didn't use it for the traffic light because each colour appears for a different amount of time.
requestAnimationFrame() can be used when smooth animation is more important than exact timing; effectively the browser calls the function when it's "ready" to redraw the screen, resulting in a less jerky effect on slower devices. My rotation example uses this technique.