Here’s a little Flash AS3 snippet that listens for the pressing of ENTER key using the Keyboard even listener.
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyEnterHandler);
function keyEnterHandler(event : KeyboardEvent) : void
{
if (event.keyCode == Keyboard.ENTER)
{
returnSavings_mc.visible=true;
}
}