Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flash quiz game

New Here ,
Oct 06, 2009 Oct 06, 2009

Hi

I'm making a flash quiz game like instructed in this tutorial. http://www.tu-world.com/flash/flash_tutorial_08.php

After anwsering, it goes to the next frame, really simple. How is it possible that a anwser would be 50% correct?

Write actionscript for every button:

on (release){

gotoAndPlay("02");

}

For RIGHT answer write:

 

on (release){

gotoAndPlay("02");

score++;

}

Last frame AS percent=score/4*100 + "%";

Best regards

Ekri

TOPICS
ActionScript
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Oct 09, 2009 Oct 09, 2009

I don't see where my code would be the problem.  If you only add 0.5 to the score and divide it by 10 and multiply it by 100 you get 5%.  I mentioned already, you need to see what is going on with your score, and just as likely your calculation of the final score.

Translate
LEGEND ,
Oct 06, 2009 Oct 06, 2009

Where do you end up seeing an answering being 50% correct?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 08, 2009 Oct 08, 2009

Hei

The anwsers in my quiz are 50% correct (half a point) if he/she anwser a question that is close, but not tottaly correct.Or for example

How clean is your room?

I clean my room every day 100%

I clean my house once a week 50%

Never 0%

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 08, 2009 Oct 08, 2009

If clicking a button will result in half a point being given, then instead of having the score++ line, for that particular button you would have score += 0.5

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 08, 2009 Oct 08, 2009

Hei

Thanks for the reply.

I have 10 questions (100%) and when changing the score +=0,5 it still gives the result of 10%.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 08, 2009 Oct 08, 2009

Why would anything give a result of 10%?  Your score value would need to be 0.4 in order to get a 10% result.  Instead of worrying about the percentage for the moment, just have your 'score' value displayed

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 09, 2009 Oct 09, 2009

what i meant to say is, if there are 10 guestions, each question has 3 possible anwsers: one being 100% correct, the second being 50% correct and third one 0% correct.Now if a person anwsers only 1 question right, and it being the 50% correct anwser, the total outcome result would be 5% correct anwsers.I entered the code u gave me, but that didn't change it. Instead of 5% correct anwsers, it still gives 10 percent.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2009 Oct 09, 2009

I don't see where my code would be the problem.  If you only add 0.5 to the score and divide it by 10 and multiply it by 100 you get 5%.  I mentioned already, you need to see what is going on with your score, and just as likely your calculation of the final score.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 09, 2009 Oct 09, 2009

Ok, got it working.Thank you soo much

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2009 Oct 09, 2009
LATEST

You're welcome

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines