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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PaulyWollyAuthor Commented:
Nevermind. I figured it out myself.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pls make a request in the commuity clean up section to have your question deleted and your points refunded.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Applications

From novice to tech pro — start learning today.