Wat is the action script for keyboard input?

i have created 12 piano keyboard keys on my screen… i want my users to have keyboard input using the computer keyboard
eg: the letter ‘a’ for the piano key “a”

when the user press “a” on the computer keyboard, the sound of that key should also apprear…
wats the action script?
pls help…

[AS]
onClipEvent (enterFrame) {
if (Key.isDown(Key.getCode() == 65)) { // not sure if it should be = or == here… swich if it doesn’t work
trace(“A is down”);
} else if (Key.isDown(Key.getCode() == 66)) {
trace(“B is down”);
}
}
[/AS]

here’s some links.

this one describes the keyCode() function, with which you will check which key is pressed.
http://livedocs.macromedia.com/flash/mx2004/main/12_as269.htm#wp236226

this one displays a list of every key, A-Z and 0-9
http://livedocs.macromedia.com/flash/mx2004/main/appx_c_2.htm

then just use the blue arrowkeyss at the top of the page to check other keyCodes.

On the timeline:


listen = new Object();
listen.onKeyDown = function(){
if(Key.isDown(65)){
//play sound a
}
}
Key.addListener(listen);

The page Kalliban provided is pretty useful:
http://livedocs.macromedia.com/flash/mx2004/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004_Documentation&file=appx_c_2.htm