Skip to main content
Participant
February 16, 2007
Answered

Key Class Woes

  • February 16, 2007
  • 1 reply
  • 144 views
Hi,
I'v e been doing some reasearch on the key class, but I'm confused. Here is my code:

var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
_root.my_sound.start(0,0);
_root.gotoAndStop("stop");
}
};

How would I change it so it looks for a key such a j or f instead of enter???
This topic has been closed for replies.
Correct answer kglad
try:

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 16, 2007
try: