I am trying to achieve a reverse countdown with flash scripting.

I got up to the following code:
var counter = 15;
this.onEnterFrame = function () {

function printime() {
    if(counter > 0){
        counter = string(counter - 1);
        timer_txt.text = counter;        
    } else {
        timer_txt.text = "Test";    
* I want it to take a second to reload each number, it does it for 15, then everything else high-speed (I couldn't find a sleep function for flash).

* When the end comes, it shows nothing instead of "Test".

There is a dynamic text field called timer_txt. Script is in "Action" layer and the textbox is in it is own layer (I also tried putting the script+textbox within the same layer).

Thanks for the help beforehand,