Quiz - how to get back to main timeline and reset question
Hey everyone, I have a flash files using as3 and on frame one of the timeline is a movie clip is a quiz and the user picks 1 or 3 possible answers. If the user selects the wrong answer, it opens another movie clip on top of the existing with a review. From there, there is a back button which I have going back to the first frame and it re-asks the question again. The problem I am having is when the user goes back, the answer they selected is already selected. I would like the question to be reset.
Here is my back code which takes me back to the main timeline
back_btn.addEventListener(MouseEvent.CLICK, goClickMe);
function goClickMe(event:MouseEvent):void {
MovieClip(parent).gotoAndStop(1);
}
and here is the code I have on the first frame of the quiz:
var radioGroup1:RadioButtonGroup = new RadioButtonGroup("Question 1");
var feedback:MovieClip;
rb1.label = "A";
rb2.label = "B";
rb3.label = "C";
rb1.group = radioGroup1;
rb2.group = radioGroup1;
rb3.group = radioGroup1;
submit_btn.addEventListener(MouseEvent.CLICK, submitClick);
function submitClick (event:MouseEvent):void {
if (radioGroup1.selection == null) {
return;
}
if (radioGroup1.selection.label == "A") {
feedback = new Feedback1();
feedback.x = 0;
feedback.y = 201;
addChild(feedback);
}
if (radioGroup1.selection.label == "B") {
feedback = new Feedback2();
feedback.x = 0;
feedback.y = 201;
addChild(feedback);
}
if (radioGroup1.selection.label == "C") {
feedback = new Feedback5();
feedback.x = 0;
feedback.y = 201;
addChild(feedback);
m_VariableHandle["slideVisited" + m_VariableHandle.cpInfoCurrentSlide] = 1; //Put this line of code where right answer is.
}
}
