|
-
1136 error with a KeyboardEvent
I'm trying to add a KeyBoard event in addition to the MouseEvent I already have for my function. So I set up the following code to handle that but it's giving me 1136 errors looking for an argument inside the parenthesis when in reality, it doesn't need one. What to do?
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPressed);
function onKeyPressed(evt:KeyboardEvent):void {
switch (evt.keyCode) {
case Keyboard.RIGHT:
slideRight();
break;
case Keyboard.LEFT:
slideLeft();
break;
}
}
Adam Bell
[email protected]
--
Over 90% of all websites
suck......
Join the minority.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|