Trouble with Pause / Play Buttons

Hello all,

Having some trouble with a slideshow flash file. The snippet of AS is attached below. The play functionality is working fine, but when the slideshow is running, the pause button won’t work. Any idea what I’m doing wrong?

NextFrame = function(){
if (whichPic<NumCount) {
bLoad = true;
whichpic++;
} else {
if (whichPic==NumCount){
bLoad = true;
whichPic = 1;
}
}
}

PlayBTN.onRelease = function() {
setInterval(NextFrame, 2000);
}

PauseBTN.onRelease = function() {
clearInterval(NextFrame);
stop();
}