I've done this before. Its easy.
Just use variables.
Say you have a question.. Like, "what color is grass?"
Then you have 3 buttons for the 3 answers "red" "green" "blue"
Then attach an answer variable onto each button
On Release {
questionOneAnswer = false;
}
On Release {
questionOneAnswer = true;
}
On Release {
questionOneAnswer = false;
}
Do that for as many questions as you want and then have a "continue" or
"finished" button to go to the results page. So make a label on the timeline
called "finished"
And attach a goto to that button like this:
On Release {
gotoAndPlay("finished");
}
Then on that frame test all the results like this:
If(questionOneAnswer)
totalCorrect++; //increment the total answers they got right
If(questionTWOAnswer)
totalCorrect++; //increment the total answers they got right
And on and on....
Then on the page you could make a dynamic text field with a variable name of
totalCorrect and it will display how many they got right.
You could do the same for total incorrect and subtract that number each time
one is correct.
That¹s just a quick and simple way to do it but that'll work.
On 12/1/04 12:01 AM, in article BDD32AEC.F40F%stu@maynard-keene.co.uk,
[quoted text, click to view] "Stuart Maynard-Keene" <stu@maynard-keene.co.uk> wrote:
> in article BDD29A5D.EA40%stu@maynard-keene.co.uk, Stuart Maynard-Keene at
> stu@maynard-keene.co.uk wrote on 30/11/04 9:45 pm:
>
>> Hi forum,
>>
>> Sorry if this is a really stupid question but I'm trying to create a quiz
>> that has got 6 questions and each question has 3 answers. At the end of the
>> quiz the answers get totalled and the result gets displayed depending on
>> your choices.
>>
>> Anyone done anything like this or can point me in the right direction to a
>> tutorial.
>>
>> Again apologies if it's a stupid question but I'm a flash newbie ;-)
>>
>> I've looked at the Macromedia templates and I'm not sure it is the right
>> thing?
>>
>> Thanks in advance
>> Stuart Maynard-Keene
>
> Anyone with any ideas, it's just I got to get this quiz out today :-(
>
Yeah
In each button add another variable on button Release like:
totalAnswers++;
And at the end tally up total correct answers vs total answers
So totalAnswers might end up being 12 and 6 were correct
So that would be "average"
You could do a test like
Score = totalAnswers - TotalCorrect;
In this case score would equal 6
Then you could say:
if (Score > 6 )
gotoAndPlay("good")
if (Score < 4 )
gotoAndPlay("bad")
else gotoAndPlay ("Average");
Again that¹s rough, but hopefully you get the idea..
On 12/1/04 2:49 AM, in article BDD35252.EAF2%stu@pageworks.co.uk, "Stuart
[quoted text, click to view] Maynard-Keene" <stu@pageworks.co.uk> wrote:
> On 1/12/04 9:58 am, in article BDD2D5A8.109C3%xxx@yyy.zzz, "sideburn"
> <xxx@yyy.zzz> wrote:
>
>> I've done this before. Its easy.
>> Just use variables.
>>
>>
>> Say you have a question.. Like, "what color is grass?"
>>
>> Then you have 3 buttons for the 3 answers "red" "green" "blue"
>>
>> Then attach an answer variable onto each button
>
> Thank you for your reply, what I'm actually trying to do it count their
> answers so there isn't a right or wrong answer.
>
> Depending on the result they will be defined as either Good, Average or Bad
> from their answer count can this be done similar to how you've have
> helpfully stated?
>
Ill see what I can do tomorrow
Or later on today I mean..
On 12/1/04 5:08 AM, in article BDD372B9.FA46%stu@pageworks.co.uk, "Stuart
[quoted text, click to view] Maynard-Keene" <stu@pageworks.co.uk> wrote:
> On 1/12/04 12:36 pm, in article BDD2FAD4.109FD%xxx@yyy.zzz, "sideburn"
> <xxx@yyy.zzz> wrote:
>
>> Again that¹s rough, but hopefully you get the idea..
>
> Thank you for this your help it is much appreciative. But I can't get the
> syntax right and I'm probably not attaching the right thing anyway.
>
> Do you have a sample I could possibly take a look at?
>
> Once again thank you for your help ;-)
>
in article BDD29A5D.EA40%stu@maynard-keene.co.uk, Stuart Maynard-Keene at
stu@maynard-keene.co.uk wrote on 30/11/04 9:45 pm:
[quoted text, click to view] > Hi forum,
>
> Sorry if this is a really stupid question but I'm trying to create a quiz
> that has got 6 questions and each question has 3 answers. At the end of the
> quiz the answers get totalled and the result gets displayed depending on
> your choices.
>
> Anyone done anything like this or can point me in the right direction to a
> tutorial.
>
> Again apologies if it's a stupid question but I'm a flash newbie ;-)
>
> I've looked at the Macromedia templates and I'm not sure it is the right
> thing?
>
> Thanks in advance
> Stuart Maynard-Keene
Anyone with any ideas, it's just I got to get this quiz out today :-(
Hi,
I could be misreading your intent here, but quiz template #2, frame 6 has a multiple choice component that could be used (repeated) to allow for three answers per question.
in article cok07l$ap8$1@forums.macromedia.com, mc_clure at
webforumsuser@macromedia.com wrote on 1/12/04 8:43 am:
[quoted text, click to view] > Hi,
> I could be misreading your intent here, but quiz template #2, frame 6 has a
> multiple choice component that could be used (repeated) to allow for three
> answers per question.
> J
Thank you J for your response, I looked at that earlier, not the thoroughly
mind, I take a look again, thank you.
On 1/12/04 9:58 am, in article BDD2D5A8.109C3%xxx@yyy.zzz, "sideburn"
[quoted text, click to view] <xxx@yyy.zzz> wrote:
> I've done this before. Its easy.
> Just use variables.
>
>
> Say you have a question.. Like, "what color is grass?"
>
> Then you have 3 buttons for the 3 answers "red" "green" "blue"
>
> Then attach an answer variable onto each button
Thank you for your reply, what I'm actually trying to do it count their
answers so there isn't a right or wrong answer.
Depending on the result they will be defined as either Good, Average or Bad
from their answer count can this be done similar to how you've have
helpfully stated?
On 1/12/04 12:36 pm, in article BDD2FAD4.109FD%xxx@yyy.zzz, "sideburn"
[quoted text, click to view] <xxx@yyy.zzz> wrote:
> Again that¹s rough, but hopefully you get the idea..
Thank you for this your help it is much appreciative. But I can't get the
syntax right and I'm probably not attaching the right thing anyway.
Do you have a sample I could possibly take a look at?
Once again thank you for your help ;-)
Don't see what you're looking for? Try a search.