Is there a way to process F1 and ESC keypresses in actionscript?
The problem is, when I press F1 in the movie (which is a game actually) the browser's help will be displayed too.
ESC does not even get to the movie, it will be 'consumed' by the player. I assume it's the 'pause' hotkey for the player, that's why it's not directed to the movie itself.
you definitely can't use F1 (or any other Fx key i don't think) because it will always bring up the help. If you want to track the ESCAPE key, however, you can use this code (put it in the first root frame):
The problem is, the onKeyDown handler won't be called for the ESC key. It will be called for every other key, even for all Fx keys (F1 too, but it triggers the browser's help also).