-
1. Re: Multiple Choice Quiz Score
Ned Murphy May 5, 2012 6:05 AM (in response to Captain_Uppercut)Create an actions layer that extends the full length of the timeline and in frame 1 create a score variable. As you go along with the quiz, add/subtract value to that variable for right/wrong answers. As long as that layer extends to the end, that variable is accessible to be changed, and at the end will equal whatever value it has accrued.
-
2. Re: Multiple Choice Quiz Score
Captain_Uppercut May 5, 2012 7:59 AM (in response to Ned Murphy)Thanks Ned. You have pointed me in a helpful direction.
I am a complete beginner with this type of thing. I had la ook about online and came across this, could you tell me if this is what you had in mind?
1st Frame: _root.total = 0;
Subsequent Frames: _root.total = Number (total) 1;
These didn't work. I think might have been to do with the placement of them and also the source was using them in a slightly different way.
Here is the source of what I found: http://www.youtube.com/watch?v=LiVpLJ9zMwE
Some further assistance would be greatly appriciated. If it's not too much trouble.
-
3. Re: Multiple Choice Quiz Score
Ned Murphy May 5, 2012 10:22 AM (in response to Captain_Uppercut)1 person found this helpfulThat code will only have a chance of working if you are publishing for AS2. In the first frame you want to declare the variable... there should be no need for any _root (AS2) reference...
1st frame: var total:Number = 0;
subsequent frames.... total += 1 or total -= 1 // add 1 or subtract 1
note: total += 1 is the same as: total = total + 1 (similar for -= )
-
4. Re: Multiple Choice Quiz Score
Captain_Uppercut May 5, 2012 1:02 PM (in response to Ned Murphy)Again, thank you Ned. You have been more than helpful.
One last question. Would it be possible to display this score? If so, how?
Thank you.
-
5. Re: Multiple Choice Quiz Score
Ned Murphy May 5, 2012 3:06 PM (in response to Captain_Uppercut)1 person found this helpfulCreate a textfield, give it an instance name, and assign the score to it as its text property...
yourTextField.text = String(score);
-
6. Re: Multiple Choice Quiz Score
Captain_Uppercut May 25, 2012 10:40 AM (in response to Ned Murphy)Ned, apologies for the late reply. Thank you for all your help. I'd buy you a beer or two, if I could...
Thanks again,
Max