I have a quiz that is coming up when a video hits certain cue points and only goes away and begins to play again when they answer the correct question. I am having a problem where I think the question class is still instantiated from the last question I answered because it goes away every time after the first question even if you answer wrong. Here is what I have tracing out for 3 questions (1 through 3):
//after I submit first:
submitting correct answer
close the quiz
//after I submit second:
submitting correct answer
close the quiz
submitting correct answer
close the quiz
//after I submit third:
submitting correct answer
close the quiz
submitting correct answer
close the quiz
you answered wrong
submitting wrong answer
So you can see when I submit its checking the current question plus all the previous ones. I need to know how to kill the previous one. Here is how I start each question:
private function cuePointHandler(e:MetadataEvent):void
{
//trace(e.info.time);//time cuepoint was set
trace(e.info.name);//name of cuepoint
if(__answers[e.info.parameters.id] != "noquestion")
{
var q:VTODQuestion = new VTODQuestion(e.info.parameters.id,__answers,this);
}
else
{
trace("not a question..going to next cue");
}
}
I need to kill the q instance after Its done being answered. Anyone know how??