
Welcome Guest
|
#1
|
|||
|
|||
|
I have a quiz where u have 5 questions.Each has four answer options(These are buttons A,B,C,D).Each question is place in an individual keyframe.I want that all the five questions should be asked randomly and none of the questions should be repeated. The script below has been inserted in all the question keyframes tell me wether it works
done = new Array(); frame = _root._currentframe; length = done.length; if (length>=5) { // all questions have been done gotoAndStop ("report"); } for (i=0; i<=length; i++) { // see if the frame already exsists in 'done' if (done == frame) { // if it does, go to another question gotoAndPlay (random(5)+1); } } // if it does not, add this frame to 'done' pushed = done.push("frame"); do I need to insert the first line done = new Array(); in all the keyframes.... Where do I insert the stop() tag because I want it to stop at the first frame and from then on go to the random frames I have a scoring system where If the user clicks on the right option button(from A,B,C,D)the score increases by 10 points. So it is mandatory that if he clicks on one option the question has to change as if it does'nt then the score keeps increasing if he keeps clicking on the right answer PLease letme know Make changes to the existing script |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|




