-
Hi - I'm having hellish problems trying to use radio buttons in the following:
I've set up a simple quiz thus...
A question, followed by three radiobuttons (all with distinct _names) for the multiple choice, and finally an ordinary button for the user to submit their chosen answer.
If the answer is correct I need the user to be taken to the next question (or frame number 'whatever'), and if incorrect I need then to be taken to a 'try again' frame.
So... does any kind (and clever) person know how I get the 'submit' button to evaluate which radiobutton has been checked; so I can use that info to take the user to the next appropriate stage?
I'm using the radiobutton smartclips that come with v5 - and they seem to function just fine visually - but I just can't work out how to use them in the above, actionscripting context.
Any help hugely appreciated!
Fran
-
curmudgeon
all that the radio buttons do is write to a variable called "radio" in the root timeline.
To verify this put a dynamic text field in the root timeline and name it radio.
to check that an answer has been checked :
define radio=""; in the main timeline.
and attach this to the button
Code:
on (release) {
if (radio=="") {
trace("please choose")
}
}
technically radio should equal 1 because the example that ships with flash has the top one allready checked.
-
A million thanks! I've been scraching my head, desperately ploughing through Macromedia tech notes and actionscripting manuals, screeching like a chimp and generally getting myself into a right state about this!
Talk about not being able to see the wood for the trees!
Cheers swampy... from the happiest person in the front of a computer today!
Fran
-
curmudgeon
no worries
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|