Exiting onclipevent

Hi

I was wondering how I could exit an onclipevent handler. I have a game where I want to make it so that you can run out of gas. But so far I am having problems, and the person who is teaching me flash told me that I needed a function to exit the clip event handler. I could only find escape(), which is for actionscript 1 and I am using 2.0. Here is what I have so far:
onClipEvent(enterFrame){
if(gas<0){
gotoAndPlay(“nogas”);
trace(“No More Gas”);
}
}

The trace works, but the gotoandplay doesn’t

Thanks, Zane