?
Solved

Cannot use ESCAPE key in Flash CS3. Not being detected

Posted on 2008-01-25
2
Medium Priority
?
384 Views
Last Modified: 2012-08-13
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";
    }
};
Key.addListener(KeyListener);

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.
0
Comment
Question by:PaulyWolly
2 Comments
 

Accepted Solution

by:
PaulyWolly earned 0 total points
ID: 20748817
Nevermind. I figured it out myself.
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 20757254
pls make a request in the commuity clean up section to have your question deleted and your points refunded.
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses
Course of the Month4 days, 16 hours left to enroll

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question