Radio Button Quiz Problem!
Hi everyone,
I'm trying to make a basic true/false quiz in Flash.
It involves a question with two radio buttons with instance names t1 and f1 (true and false).
When the user presses check answers a movieclip with instance name yn1 moves to frame 2 or 3 which displays a tick or cross.
This is all working fully, the problem arises if the user presses check answers again.
This for some reason turns the ticks to crosses and the crosses to ticks and I have no idea why!?
My code is as follows:
import flash.events.MouseEvent; stop(); checkAns.addEventListener(MouseEvent.CLICK, checkAnswers); function checkAnswers (Event:MouseEvent):void { if (t1.selected==true) { yn1.gotoAndPlay("true"); } else { yn1.gotoAndPlay("false"); }
if (t2.selected==true) { yn2.gotoAndPlay("true"); } else { yn2.gotoAndPlay("false"); }
if (f3.selected==true) { yn3.gotoAndPlay("true"); } else { yn3.gotoAndPlay("false"); }
if (f4.selected==true) { yn4.gotoAndPlay("true"); } else { yn4.gotoAndPlay("false"); } }
Apologies if its a completely simple error, I'm very new to flash.
Thanks!!!