setInterval problem

Everything works in this, except for the “gotoAndStop”. I’m positive the path is correct. I know because this works on Frame 1 but not on Frame 2 (with a different gotoAndStop number of course).

setInterval(countDown, 1000);
function countDown() {
    sec--;
    if (sec == 0) {
    this.bttn2.gotoAndStop(7);
    gotoAndStop(_currentframe + 1);  // gotoAndStop(nextFrame) doesn't work.  =[
    }
    trace(sec);
}

After more research, I think the reason my setInterval isn’t working on Frame 2, 3, etc. is because I don’t have a clearInterval call. Not exactly sure how to do this.


clearInterval(countdown);
setInterval(countdown, 1000);
function countdown() {
    trace("this ams frame 2");
    sec--;
    if (sec == 0) {
        bttn2.gotoAndStop(7);
        gotoAndStop(_currentframe+1);
    }
    trace(sec);
}

this doesn’t help much.