# Flash Quiz Help

**URL:** <https://forum.kirupa.com/t/flash-quiz-help/327749>\
**Category:** Uncategorized\
**Created:** [March 26, 2012, 9:06am UTC](https://forum.kirupa.com/t/flash-quiz-help/327749 "2012-03-26T09:06:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitchenman](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@kitchenman](https://forum.kirupa.com/u/kitchenman)\
**Post date:** [March 26, 2012, 9:06am UTC](https://forum.kirupa.com/t/flash-quiz-help/327749/1 "2012-03-26T09:06:03Z")

</div>

Hi, I am trying to make a quiz in Flash CS5 on AS2.  
So far i have created the basic layout, scoring system, random question generation  
the issue i am facing is that when i create more than one scene, so that i can have different  
categories on the quiz, i have coding on my question number to go up after each answer is selected, and then when it reaches a certain labelled frame, it is supposed to skip to a frame in the main timeline, which shows their final score  
this coding works when i have only one scene  
but when i copied the scene to make the new categories, the coding stopped working  
and would just continued on the timeline in the movie clip  
Here is the coding i have inside the incorrect movie clip (please note the incorrect movie clip is the question counter):  
\*  
stop();  
ifFrameLoaded (“FrameXYZ”) {  
\_root.gotoAndStop(22)  
}\*

Here is the coding for the array (this is on the first frame and purely sets up the array):

_stop();  
Array.prototype.shuffle=function(){  
for(i=0;i\<this.length;i++){  
var tmp=this_;  
var randomNum=random(this.length);  
this\*=this[randomNum];  
this[randomNum]=tmp;  
}  
}  
var myFrames2 = new Array(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,13,14,15,16,17,18,19,20,21);  
myFrames2.shuffle()\*  
_var index = 0;_

And here is the code for each correct answer:

\*on (release) {if(myFrames2[index++]){  
gotoAndStop(myFrames2[index])  
}else{  
index = o  
;  
}  
}  
on (release) {  
tellTarget ("/correct") {  
nextFrame();  
}  
}  
on (release) {  
tellTarget ("/incorrectscene1") {  
nextFrame();  
}  
}

\*And here is the code for each incorrect answer (please note the incorrect movie clip is the question counter not the incorrect answer):

\*on (release) {  
tellTarget ("/incorrectscene1") {  
nextFrame();  
}  
}  
on (release) {if(myFrames2[index++]){  
gotoAndStop(myFrames2[index])  
}else{  
index = o  
;  
}  
}

\*The actual .fla file is too large to post on the forum but if anyone would like it please message me your email and i will send the file.  
Thanks
