LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 


Prev Previous Post   Next Post Next
  #1  
Old 06-05-2001, 05:12 AM
morphis morphis is offline
Registered User
 
Join Date: Jun 2001
Posts: 5
Rep Power: 0
morphis is on a distinguished road
Fix

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

Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump




All times are GMT. The time now is 05:32 AM.