Bouncing ball karaoke algoritm?

Hi,

I am trying to work out a way to achieve the bouncing ball effect over text known from karaoke players ?

I would like this to be done programatically with actionscript, so the ball follows the text AND the soundfile (looking for pauses or DB rises?maybe not). I have heard its a question of finding the right algoritm? Its use will be in a language lab-like flash app based on Communication server, where the user can :

  1. Hear the correct pronounciation of a sentence (with bouncing ball over text)
  2. record their own voice
  3. compare the two

A working sample code would be appreciated at this stage ?

Best regards Cryptoboy