1 Reply Latest reply on Jul 22, 2006 7:57 AM by Newsgroup_User

    Gaming Help. Need to place random variables on screen

    brananc1
      Hello all,
      I need some help with placing random variables on the screen. What I am trying to do is have the program load a picture and then place 3 answers next to it. I want the program to load the correct answer with 2 wrong answers. when the wrong answer is picked then that option/answer is no longer available for clicking. when the right is picked then it should reload everything and start over with a new picture/variables. I can get it to work if I right the same code 100 times, but i am sure there is a way to do this as a loop or something. I am very new to programming so please be gentle. Thanks


      Brandon
        • 1. Re: Gaming Help. Need to place random variables on screen
          Level 7
          Brandon,

          > What I am trying to do is have the program load
          > a picture and then place 3 answers next to it.

          Have you gotten this far yet? Knowing this would help gauge your
          comfort level with ActionScript.

          > I want the program to load the correct answer with
          > 2 wrong answers. when the wrong answer is picked
          > then that option/answer is no longer available for
          > clicking.

          Okay, now we're adding to the complexity. ;)

          > when the right is picked then it should reload
          > everything

          ... what do you mean by "everything"?

          > and start over with a new picture/variables. I can get
          > it to work if I right the same code 100 times, but i am
          > sure there is a way to do this as a loop or something.

          What you're describing seems to be a multiple choice quiz, or possibly a
          game. In any case, it's got a lot going on, which means you'll need to
          break it down into smaller goals -- and possibly break *those* down into
          smaller goals -- until you arrive at a handful of specific questions.

          I'm happy to help, and there are plenty others here equally ready to do
          so, but what you've asked is too wide open to be answered specifically. How
          are your questions formatted? Are they TextField instances, or maybe static
          text fields in MovieClip instances (or, heck, buttons)? How are you loading
          your images? Are they external or internal? Is the text content of your
          questions coming from an external XML file? The answers to all of these
          questions (and probably more) make all the difference in someone's offering
          you advice.

          So break it down and let's see what you've got. :)


          David
          stiller (at) quip (dot) net
          Dev essays: http://www.quip.net/blog/
          "Luck is the residue of good design."