Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : Key Events In Actionscript



BrendanCCAC
6/17/2004 8:17:06 PM
Does anyone know how the key events work in actionscript? I want to play a
movie clip when someone presses (or holds down) a key on the keyboard. But I'm
not quite sure how to do it. I've seen this...

on(keyPress "<Enter>")

But it doesn't seem to be meant for what I'm talking about. Any help would be
greatly appreciated! Thanks!
kglad
6/18/2004 1:03:01 AM
myListener = new Object();
myListener.onKeyDown = function () {
yourMC.play();
}
Key.addListener(myListener);
AddThis Social Bookmark Button