1 Reply Latest reply on Nov 9, 2007 6:55 AM by kglad

    Problem with on (keyPress "......")

    popescuradhoo
      Can anyone tell me how can I make an animation that on the first frame it has a button that if you press or press from the keyboard : CTRL or ALT or F1-F12,TAB,ESC it can take me to frame 2.The problem is that I can`t set those keys in the actionscript.
      I have tryed also :
      var keyListener:Object = new Object();
      keyListener.onKeyDown = function() {
      if (Key.isDown(18)) {
      trace("alt");
      }
      if (Key.isDown(9)) {
      trace("tab");
      }
      if (Key.isDown(16)) {
      trace("shift");
      }
      if (Key.isDown(17)) {
      trace("ctrl");
      }
      if (Key.isDown(112)) {
      trace("F1");
      }
      // .....
      // F10 nu merge ca e rezervata
      if (Key.isDown(123)) {
      trace("F12");
      }
      };
      Key.addListener(keyListener);

      But it doesn`t work.So if anyone can help me...maybe with a *.fla too...