Please help!

I’m trying to create a code that will direct the user to a certain frame and have the last frame of the sequence depend on which button is pressed on the main stage. It seems to be basic actionscript (If/Else), but as you’ll see, I’m new to all of this. Here’s my code:

Set Variable:“x”=_root.Nav_mc._currentframe;
on (release) {
if(_root.Nav_mc.(x+_nextframe == 11));
_root.Nav_mc.gotoAndPlay(“end”);
}else{
_root.Nav_mc.gotoAndPlay(_nextframe);
}
}