If statement to evaluate quiz

Hi there everybody

I am having some weird problems with a quiz I’m making.

There are 8 questions in the quiz. However, each of the eight questions are chosen randomly from three so that the quiz is never exactly the same twice. The first half of the quiz is comprised of ‘fill in the blanks’, while the second half is true/false. I can’t get the 4th question to evalute the correct answer. The function below is called from the true and false buttons. The variable correctAnswer (either a 1 or 0) is in the frame actions for the question. Choice is either 1 or 0 depending on whether you click true or false.

//function to evaluate answer
function categoryTwoCheck(){
	if(choice==correctAnswer){
	score+=1;
			answer_txt.htmlText=wrapUpLoadVars.correct;
		}else if(choice!==correctAnswer){
		answer_txt.htmlText=appropriateDistractor;	
			score+=0;
		}
}

//code that's on an actions frame in the timeline for the question
correctanswer=1;

t_btn.onRelease=function(){
	choice=0;
	categoryTwoCheck();
	this._visible=false;
	f_btn.enabled=false;
	}	
	
f_btn.onRelease=function(){
	choice=1;
	categoryTwoCheck();
	t_btn.enabled=false;
	this._visible=false;
}

I’ve zipped up the fla, swf, and .txt file and attached it here.

Thanks for taking the time to look…