dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: ESC Keypress not working, please help

  1. #1
    Chemist
    Join Date
    Oct 2002
    Location
    San Francisco
    Posts
    204

    ESC Keypress not working, please help

    Hey all,
    I am working on a site that requires a state change when the ESC key is pressed. I have tried different keys and they all fire. To attept to make the ESC key work I am using the following code

    Code:
    listener = new Object();
    listener.onKeyDown = function() {
            if (Key.isDown(Key.ESCAPE)) {
    			fsBut.gotoAndStop("off");
    			trace("ESC DOWN");
    			}
        }
    Key.addListener(listener);
    Any help you can provide, I would greatly appreciate it!

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,
    In order for the ESC key (and others) to work when testing a movie, you need to disable keyboard shortcuts:

    Control -> Disable Keyboard Shortcuts
    (in the testing player)

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