PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Multiple answers to question
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Multiple answers to question

  1. #1
    Member
    Join Date
    Sep 2005
    Posts
    64

    Multiple answers to question

    Me again, with a different problem...

    How do you check for correct answers to a question, when there are four correct answers from a possible six. The answers can be answered in any order, and each answer can only be used once.

    Want to avoid having to do a manual check along the lines of:

    Actionscript Code:
    if (answered[0] == answer1) {
            game_stage = CORRECT_ANSWER;
        }
    if (answered[0] == answer1 && answered[1] == answer2) {
            game_stage = CORRECT_ANSWER;
        }

    as this quickly gets inefficient and messy...

    Any smart ideas, very greatly appreciated.

    Thanks indeed!

  2. #2
    Senior Member
    Join Date
    Mar 2011
    Location
    Riverside ish...
    Posts
    173
    array(s) with the questions, correct yes or no flag, and a been used flag?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center