We help IT Professionals succeed at work.

Cannot use ESCAPE key in Flash CS3. Not being detected

I want to use the ESCAPE key in Flash CS3 to return from FULLSCREEN mode and do an action as it returns to NORMAL mode. I am finding that I can use any other key except the ESCAPE key to do this.

I have this code but it is partially working:

// code on a button to go to FULLSCREEN mode
on (release) {
   Stage.displayState = "fullScreen";
   //make image on _root NOT VISIBLE
   _root.ds_bkgd._visible = false;
// code on button to return to NORMAL mode
on (press) {
   Stage.displayState = "normal";
   // make image on root VISIBLE
   _root.ds_bkgd._visible = true;
// set up a text field to show what we pressed
txtField.text = "Empty";
var KeyListener:Object = new Object();
KeyListener.onKeyDown = function():Void  {
    if (Key.getCode() == 27) { // escape key
        //trace("Escape Key was Pressed");
        txtField.text = "Escape Key was Pressed";
        // make image on _root VISIBLE
        _root.ds_bkgd._visible = true;
    if (Key.getCode() == 32) { // space bar
        //trace("Space Bar was Pressed");
        txtField.text = "Space Bar was pressed";

I have not found any information on the internet to offer an answer to this. I am also sure that I am not the only person with this question.
Watch Question

Nevermind. I figured it out myself.
Top Expert 2009

pls make a request in the commuity clean up section to have your question deleted and your points refunded.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.