...

View Full Version : keyboard hogging



warhammerdude20
03-20-2005, 11:46 PM
Hey,

Ive made a 4 player javascript game and i get the key events like so...




<html>
<head>
<script language=javascript>

function getKeyDown(evt){
if(evt.keyCode==whatever){
//blah blah blah
}
}

</script>
</head>
<body onKeyDown="getKeyDown(window.event);">
</body>
</html>



So anyway, when 4 people are playing, and someone holds down a certian
key, someone elses keys dont work. Is there a way to make them all work
evenly?

thanks

A1ien51
03-21-2005, 01:31 AM
you can make it work onkeyup or onkeypress, maybe that will work.....

warhammerdude20
03-21-2005, 02:07 AM
Thanks for the reply, but when i use onKeyPress, it doesnt work at all.
and im already using onKeyUp for when the player stops.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum