0 Replies Latest reply on Jun 21, 2007 11:44 AM by KevT

    Key.isDown

    KevT
      I have a simple driving game of which the Key class is used to navigate the vehicle token. Where _root.number = # is the left, right, up, and down border limits.

      It works flawlessly on a Windows environment using IE or Firefox. However NeoWare Thin Client envrionment running Linux w/ Firefox the arrow keys do not respond.

      Would Linux recognize the ASCII code better? If so, can someone point me to a library with the codes. Or perhaps other suggestions.

      Also, I thought about trying a different set of keys to navigate such as: I, J, K, and M respectively thinking that perhaps the arrow keys on these particular clients are mapped in such away to prevent additional interaction.

      Here's the code:

      function captureKeys() {
      if (Key.isDown(Key.RIGHT)) {
      _root.number = 3;
      keyPressed = true;
      } else if (Key.isDown(Key.LEFT)) {
      _root.number = 4;
      keyPressed = true;
      }
      if (Key.isDown(Key.DOWN)) {
      _root.number = 2;
      //keyPressed = true;
      } else if (Key.isDown(Key.UP)) {
      _root.number = 1;
      keyPressed = true;
      }
      _root.onEnterFrame = function() {
      captureKeys();
      };

      Thanks for any help