2 Replies Latest reply on Aug 22, 2007 6:12 AM by ludreau

    Keyboard controlled Xs

    ludreau
      I'm just making a quick flash movie with 3 large gray Xs in the center. I want to be able to press the number 1 and then the first X will light up. Then, if the number 1 is pressed again the X will turn back to gray. I would like to be able to do this for X 2 and 3 as well. So all independant. I would also like there to be a buzzer sound when pressed. I'm kinda looking for a judge panel type thing. But any hints as to what I need to do in action script would be great!
        • 1. Re: Keyboard controlled Xs
          shurleynova Level 1
          The best way to probably do this would be with the Key class. You could create a key handler for each of the keys you want to use and then create a function for each that has an if else statement that controls whether the X is lit up or not. Possibly create 1 X that is gray and 1 X that is red and place them in the same location and set the visibilty property depending on the keypress.

          I would start with creating a Key handler though. There is some good information in the Help file about the Key Class that can help you get going in that direction.
          • 2. Re: Keyboard controlled Xs
            ludreau Level 1
            Thank you!