hmm .. i ran the file and output the array (arr) before it was shuffled.
i then ran 10 questions (after shuffling) and compared their position against the original array.
the output appears quite random -
Century, arr[98]
Abortive, arr[3]
Celestial, arr[97]
To achieve, arr[20]
Bourgeois, arr[76]
To bypass, arr[84]
Adversary, arr[29]
To account for, arr[16]
Abundant, arr[9]
Access, arr[12]
PS .. it should not matter to the array random function as to how many
elements there are in the array.
an example is, which is basically what we are doing in the file -
before shuffle
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99
after shuffle
97,32,35,15,1,19,82,64,90,42,41,66,33,13,2,20,62,24,25,3,27,0,99,38,39,22,67,16,93,61,26,17,12,14,43,31,45,94,28,37,21,79,78,89,40,65,48,47,87,76,71,11,57,53,74,70,63,36,77,73,29,6,9,58,44,56,8,18,68,72,34,80,83,49,85,54,81,91,96,5,7,69,30,55,52,4,59,95,92,75,88,46,98,10,50,84,23,60,51,86
Last edited by a_modified_dog; 10-16-2009 at 12:05 PM.
Never mind a_modified _dog... I screwed something up in the fla where the randArray was not working right. I tested it with the complete db and it seems to be working fine. Thanks a lot again. Your help is very much appreciated. I will try to get the range choice buttons work . I'll come back to either ask for more help or to close the thread.
I tried to follow your suggestion and come up with an If statement that will allow the user to choose a particular section of the db but could not make it work. What I came up with is that if in the load function I set n=100 and the arr.length to 200 like this:
for(var n=100;n!=200;n++){
then the "nextBtn" button will pick only from this section of the xml.So I thought about having a welcome page to the quiz that includes buttons assigned to different parts of the db like group one, group two, and so on. This way the user clicks on the buttons that takes him to the section he wants to be tested in. Is this like a primitive way of doing things or is it OK? I still need help on the click label event where it informs the user if the answer he chose was correct or not and to keep track of the score as a percentage.
Accomplishing these two tasks will complete the project for me.
I cannot get the feedback and score texts working right yet. What I did so far is create an AnswerButton button symbol and put four of the instances over the answers text labels. Under the "on release" for each button I put the following:
What I get is one instance of displaying "Sorry" in the feedbackTxt and nothing else. The labels do not respond to further clicks and the score text doesn't change. I know I must be doing something wrong but I still can't figure it out.
Sorry, didn't see your last post...I must have been posting at the same time. Anyways you did it again!!! Great work.. I really hope you get as much enjoyment out of helping newbies like me who feel great when they see the ideas they have in mind working smoothly... especially after being frustrated so frequently in the process. Thanks a million again.. and I hope you don't mind me saying I know where to come if I need help with Flash ansd Action Script.
Helpful and patient people like make this forum a great one.