# onKeyDown event not working

**URL:** https://forum.kirupa.com/t/onkeydown-event-not-working/58500
**Category:** flash
**Created:** [July 23, 2004, 1:18am UTC](https://forum.kirupa.com/t/onkeydown-event-not-working/58500 "2004-07-23T01:18:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![billstoudt](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@billstoudt](https://forum.kirupa.com/u/billstoudt)
#### Post date: [July 23, 2004, 1:18am UTC](https://forum.kirupa.com/t/onkeydown-event-not-working/58500/1 "2004-07-23T01:18:13Z")

</div>

for some reason nothing happens when i press the space bar.

does anyone have any clue as to why.

#initclip  
function Climber() {  
}Climber.prototype.onKeyDown = function() {  
if (Key.isDown(Key.SPACE)) {  
trace(“boom”);  
}  
};  
Object.registerClass(“man”, Climber);  
#endinitclip  
Sincerely

Bill

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 23, 2004, 1:39am UTC](https://forum.kirupa.com/t/onkeydown-event-not-working/58500/2 "2004-07-23T01:39:41Z")

</div>

hehe would have helped if i had added a listener.

Bill
