3 Replies Latest reply on Mar 6, 2007 5:17 AM by Pal_w_G

    Virtual keyboard.

      I am making a touchscreen keyboard.
      I need to be able to code a flash button so that it does the same as if you pushed a key on the keyboard.
      What would the code be for the letter "A" for example.

      Sorry for the newbie question.

      Thanks Benny
        • 1. Re: Virtual keyboard.
          If i have at all understood your problem..... then the following code should help you........

          var keyListener:Object = new Object();
          keyListener.onKeyDown = function() {
          trace("For the last key typed:");
          trace("\tThe Key code is: "+Key.getCode());
          trace("\tThe ASCII value is: "+Key.getAscii());
          if (Key.getCode() == 65) {
          trace("a has been pressed");

          When you use this code, be sure to select Control > Disable Keyboard Shortcuts in the test environment.

          • 2. Re: Virtual keyboard.
            shootthecat Level 1
            Thanks Pal_w_G for taking the time to help me.
            I didnt explain it well.

            Lets say I have made a movie.swf. In the movie is just one button. I want it so when the button is pressed, it effectively does the same as if I pressed the "A" key on the keyboard. Imagine had my cursor in the address bar of internet explorer, I then pressed the button in the movie.swf that is open in another window. The result I want is the type an "a" into the IE address bar.
            I want to make a flash keyboard that will type into any other program I have put the cursor into. Is this possible ?

            Thanks again.
            • 3. Re: Virtual keyboard.
              Pal_w_G Level 1
              Well as far as i know about flash....flash still has a lot to improve on how to communicate with the other applications running on your operting systems...... even to develope basic functioanalities such as saving or relating to a file on you harddrive needs help of other languages..........

              Any way right now i have no suggestions for you......but if you get any sort of solutions.....i request us to inform..........

              Wish you all the luck.......