An ActionScript metronome class