Keypress

Hello all you flashers,

I realsie that this is a really dumb question, but I am trying to get the syntax correct for a KeyPress action.

Instead of on(keypress) do this or whatever. It would read something like hello_btn.onKeypress = function() {
gotoand stop and blah de blah. Except I cannot get the syntax right for the first line of code. I can do onRelease fine with this method but not keypress. Please help

Thanks in advance:rambo:

This should work:

Listener = new Object();
Listener.onKeyDown = function () { 
trace("success")
};
Key.addListener(Listener);

h88