I'm trying to restore the previous text in a text field if a user
presses the Escape key. I set up a listener for the key down event. I
have got it to restore the previous value but I cannot find a way to
cancel the escape key from entering a "" symbol. You can see this
symbol by adding a TextInput to the stage and pressing the ESC key in it.
// here is my listener function
function keyDownEvent() {
// get key code
var key = Key.getCode();
var prevText:String = previousText;
// if user presses key then
if (key == Key.ESCAPE) {
trace(_name + " ESCAPE key pressed")
trace("prevText="+prevText)
// restore previous dudes text
setText(prevText);
}
}
Judah
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders