Hi,
I am fairly new to flash and really like the quiz template that Flash MX has incorporated but would like to add some features to it. Can someone please provide any information they may have about doing the following with the quizzes that are generated:
Randomize the questions being asked and allow the user to pick how many questions they wish to answer in the beginning of the quiz.
Automatically display the right answer to the question after the person taking the quiz puts in a wrong response.
Send the user to various pages depending on how they score on the quiz.
Like I said i am very new to flash and am not much of a programmer but i’m putting together a website for my wife who is a teacher and would like to be able to add some quizzes to it. Thanks for any help you can provide.
NOOOOOOOOOOOOOOOOOO!!!
omg how many quiz questions have i seen lately! it actually outweighs preloader problems i think!
lol
do a search for the random questions thing, i cant be bothered to go through it again (i did it a long time ago (past the cut-off date) for some Karen person or something…) there have been some answered since…
regarding the displaying the correct answer i cant really answer that properly as i dont know if you are using radio buttons or regular buttons or checkboxes and a submit button or what to answer and i dont know how you want your answer to be displayed… but i would suggest setting up a variable to equate to false if they choose the wrong answer, ie.
_root.Vanswer = false
then setting up a movieclip with two frames and on the first frame have this code:
regarding the results page, say you have a quiz of 10 questions and you want them to go to frame 35 if they score 0-4, go to frame 40 if they score 5-8 or frame 45 if they score 9-10:
if(score<=4){
gotoAndPlay(35) //note you might want to change to gotoAndStop(35)
}
else if(score>4 && score<=8){
gotoAndPlay(40) //again you might want to change to gotoAndStop(40)
}
else if(score>8){
gotoAndPlay(45) //gotoAndStop(45)? ;) lol
}
this should work if you keep a running total of how many correct answers they get by having this script on the correct answer button
score++
hope that was legible/understandable and i didnt assume too much prior knowlege (which i think maybe i did…) im not good at introducing things/concepts… good at tweaking and explaining things (if i have the time… which i dont coz its really late and i have comapny tomorow :S)
on randomizing the questions, you try opening a new quiz template on flash (File New From Template). you’ll be asked of how many questions to randomize on the component properties. you can create a variable (a dynamic text) which user can put the numbers of questions they wanted to have. use that variable to link on the component. havent tried but worth trying i guess.
there will be as well feedback on each questions and number of trials on the component properties (each Q has each component). you can place your own feedback and so on.