1 Reply Latest reply on Jul 19, 2007 6:59 PM by everynewday

    Key press

    joesmoes Level 1
      Hey all!

      Here is a script that i made...

      on (release, keyPress "a") {

      I'm want to allow a user to press a letter on the keyboard, then have them sent to a frame and then stop!

      Also i want to have it so i can list from A - Z, each leer goes to a different frame!

      if some one knows how to correct my error please help me.


        • 1. Re: Key press
          everynewday Level 1
          This would be the correct syntax:

          var keyListener:Object = new Object();
          keyListener.onKeyDown = function() {
          if(Key.getCode() == 65) {

          Each key has its own individual code. If you look up key codes in the Flash help, you'll find a list of all of them. Some keys can be declared by name, but others need to be declared by their code.