2 Replies Latest reply on Apr 21, 2012 7:33 PM by WitchXHunter

    onKeyUp issue?

    WitchXHunter

      _root.myListener= new Object();

       

       

      _root.myListener.onKeyUp = function() {

                if (Key.getCode()==82) {

      dosomething

      }

      }

      Key.addListener(_root.myListener);

       

      the code works when I use   if (Key.getCode()==Key.UP) but not when I use any of the number codes.

       

      even for

       

       

      keyListener= new Object();

       

       

      keyListener.onKeyDown = function() {

          trace("DOWN -> Code: " + Key.getCode() + "\tACSII: " + Key.getAscii() + "\tKey: " + chr(Key.getAscii()));

      };

      Key.addListener(keyListener);

      it only tracks when those button with Key.something works. I'm using CS4, is it a version problem?