nextFrame

I an newby in actionscript (and in thw forum) and i am creating a simple quiz. I want to go the next frame if the player press a button 3 times. I use the code:
on (release) {
_root.total = _root.total + 1;
if (_root.total == 3){
nextFrame;
}
}

but [FONT=‘Times New Roman’]nothing. What I make wrong???[/FONT]