Flash Tutorials - Timers

The following movies demonstrate how you can use the built in getTimer() function to ascertain when an event should occur or a game should end.

Timers.

Supporting Flash Movies

download
Timer with an offset
If you want to use an offset so that the gameplay timer only starts when the game actually begins as against when the Flash Movie starts e.g. you may want to read a Splash screen or the rules of the game then this should help.
preview download
Running Total
Sometimes you may want to keep a record of how long a character has been present in a particular location - In this movie you use the up and down keys to move the character onto the road - the timer stores how long the character has been present on the road - if you alternate between standing on the grass and the road, the timer will update the running total everytime the character leaves the road - a running total is displayed in a dynamic text box.Don't forget to click the box to give it focus if you are viewing the preview swf file online.
preview download
Timers are widely used particularly in games so its definately worth keeping a copy of these movies in your Flash library.



Module

specific sites

Year 1:

Emotional and
Immersive Media
DE0983

Intro to Flash
tutorial 1

Intro to Flash
tutorial 2

All Years!

Can't attend one
of Trev's sessions!
better let him know then!