Hi all,
This is my first post here so, apologies if I break any unwritten rules, or say anything ridiculous, please bare with me.
So, I have created a multiple choice quiz using Flash CS5 as part of my multimedia project and wanted to know how (or if) I can incorporate a score system to the existing quiz.
I created the quiz using the timeline and layers. So for every question there are three layers;
Layer 1 - Question w/ four possible answers (only one is correct)
Layer 2 - Correct answer
Layer 3 - Incorrect answer
I am using buttons to navigate through the timeline.
What I would like to achieve is, at the end of the quiz, a score to be generated based on the questions they got right.
I hope I have included everything necessary.
Thanks for reading and the possible help.
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.
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.
That 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 -= )
North America
Europe, Middle East and Africa
Asia Pacific