XML Fingerspelling Quiz

QuizCounter
//the boolean determining the state we are in
var inQuiz:Boolean = false;
//boolean to tell if you've selected a speed
var speedSelected:Boolean = false;
//the position of the word in the array
var quizIndex:int;
//tracks whether or not we are on a new word, or if the previous word is being repeated
var newWord:Boolean = new Boolean(false);
//keeps track of score
var quizCounter:QuizCounter = new QuizCounter(10);
QuizCounter is a class I wrote to keep track of the users score within a quiz.
package
{
public class QuizCounter
{
private var correct:int;
private var incorrect:int;
private var quizLength:int;
public function QuizCounter(quizLength:int)
{
this.quizLength = quizLength;
reset();
}
public function reset():void
{
correct = 0;
incorrect = 0;
}
public function getCorrect():int
{
return correct;
}
public function getIncorrect():int
{
return incorrect;
}
public function wasCorrect():void
{
if(correct+incorrect!=quizLength)
correct++;
}
public function wasIncorrect():void
{
if(correct+incorrect!=quizLength)
incorrect++;
}
public function getLength():int {return quizLength;}
public function isDone():Boolean
{
var toReturn:Boolean = new Boolean(false);
if(correct+incorrect==quizLength)
toReturn = true;
return toReturn;
}
}
}

