How to create a timer

we are making a game with a timer that counts from 10 to 0 and it is located inside a vcam which is a movie clip. when the timer ends or timer is now equal to 0 it will go to a frame(which contains some text and buttons) outside the movieclip but the problem that we encountered is that the stage appeared and no texts and buttons… here’s our code for the timer:

timerF = 10;

countdownF = function(){
timerF–;
if(timerF==0){

clearInterval(countdownIntervalF);
gotoAndStop(“gameOverForest”);
}

}

countdownIntervalF = setInterval(countdownF,1000);