2 Replies Latest reply on Jul 7, 2006 5:29 PM by Newsgroup_User

    Need help with question/answer routine

    Opera Rat Level 1
      Well I've set up my score with the questions going sequentually across the timeline and for now each set of q and a are on different channels. So far so good. Now there are 2 types of responses: 1) those that depend on how many times you chose a wrong answer and 2) 1 wrong response for each wrong answer (for example a, b, and d are wrong and each one gives you it's own error message).

      SET UP
      So I'm not dealing with type 1 until I get all my variables set up. I want to start with type 2, as it's easier. I have each answer on a different sprite channel. Let's say A is channel 4, B is channel 5, C is channel 6 and D is channel 7. D is the correct answer, but that is not important for this part of the script. Following the answer A in channel 4 is a marker, say q3resonse, where the response to answer A is (in the same channel as answer A). So yes the answers will disappear as the timeline moves to the reponses and that is what I want.

      MY QUESTION
      If all my responses are on top of one another in different channels how do I get just the one that corresponses to the answer in that channel to be visible. AND if it is an incorrect answer to go back to the question and have all the sprite channels visible again.
        • 1. Re: Need help with question/answer routine
          Opera Rat Level 1
          I figured out how to make the 3 reponses not wanted invisible by listing each one separately and setting the visibility to false. So how do I get it to return to the question and make everything visible again?
          • 2. Re: Need help with question/answer routine
            Level 7
            using the visible property is one way to conteol things. The visible is
            actually a channel property, rather than a sprit property, the setting
            sticks until you change it ( the checkboxes on far left of score show
            the visible states)



            say you have error messages in dedicated channels 11 to 15


            on showError errorNum -- (error 1 to 5)
            repeat with i = 11 to 15
            if errorNum + 10 <> i then sprite(i).visible = false
            else sprite(i).visible = true
            end repeat
            end


            not sure about the details of your return to question action, of the
            question is the prior marker than clicking in the error pages could
            return with


            on mouseUp
            go to marker(-1) -- prior marker
            end


            accessing the error frame with play frame "someErrorpage"

            could return to caller frame with play done