Countdown timer

I’m making a game where. you have 30 seconds to complete the stage. if you don’t finish in 30 seconds, you go to a game over screen. this much I’ve figured out.
how do I make it so that if you finish the stage within 30 seconds, the time you have left over gets added to your score.

Check out this link. It might be able to help you.

http://www.actionscript.org/actionscripts_library/main/search.cgi?query=Countdown+Timer