A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Flash AS2 Key Code

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    1

    Flash AS2 Key Code

    How do I make it on a frame when you type the letter "a" it brings you to a new frame?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Actionscript Code:
    var myListener:Object = new Object();
    myListener.onKeyDown = function() {
        if (Key.getCode() == "65" ) {
               nextFrame();
        }
    };
    Key.addListener(myListener);

    Key codes

    gparis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center