Be a Supporter!

Counter/ tally

  • 510 Views
  • 3 Replies
New Topic Respond to this Topic
neeko
neeko
  • Member since: Aug. 21, 2004
  • Offline.
Forum Stats
Member
Level 52
Animator
Counter/ tally 2006-08-08 12:41:51 Reply

Hey guys, I have to make a flash quiz for class and wanted to add a "total right questions" answered at the end. What AS should I use and how does it work if I'm using multiple scenes?

West-End-Pro
West-End-Pro
  • Member since: Feb. 15, 2006
  • Offline.
Forum Stats
Member
Level 24
Blank Slate
Response to Counter/ tally 2006-08-08 12:53:36 Reply

At 8/8/06 12:41 PM, -neeko- wrote: Hey guys, I have to make a flash quiz for class and wanted to add a "total right questions" answered at the end. What AS should I use and how does it work if I'm using multiple scenes?

if(question == correct){
_root.totalquestionsright ++
}

?

Edvin
Edvin
  • Member since: Feb. 3, 2004
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to Counter/ tally 2006-08-08 12:54:30 Reply

At 8/8/06 12:41 PM, -neeko- wrote: Hey guys, I have to make a flash quiz for class and wanted to add a "total right questions" answered at the end. What AS should I use and how does it work if I'm using multiple scenes?

Have a variable increase everytime you click the correct answer. And display that variable in a dynamic text box in the end to have the number of correct answers.

neuroproductions
neuroproductions
  • Member since: Jun. 25, 2006
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to Counter/ tally 2006-08-08 12:57:04 Reply

first of all:
if you use actionscript (in this case for keeping the score), NEVER work with scenes. They are just crap and to buggy. (only use scenes for strict animation)

to answer your question:
you should keep the score in a variable
somthing like this

var score:Number = 0
next_btn.onRelease = function() {
if (answer){
scrore++
}
}