setInterval and sound problem

Does anyone know how I can use a timer function (setInterval?) so that when the music stops a Time’s Up message appears and the movie goes to the next frame…any ideas?

I’ve been trying to use setInterval but it I can’t seem to link it with when the sound stops…If anyone can point me in the right direction I’d be eternally grateful!

Yossi