| Author |
Applet in html page not reacting for keys
|
Rudolf Hergat
Greenhorn
Joined: Jun 21, 2012
Posts: 6
|
|
Hey
My friend have a problem with an applet and I coudln't help him. Here it is:
"I have a problem with an applet I put into an HTML page.
<applet id="applet" codebase="classes" code=Mappa/Jatek.class" width=800 height=600"></applet>
It's a game where the user controlls a stickman. Somehow the KeyPressed event doesn't seem to work and it doesn't react for the keys. Maybe the applet can't get the focus?
Thank you."
Thank you forwards for the answers.
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8441
|
|
|
It's years since I worked on applets, but from what I remember, you need to click the applet to enable it to get focus. Can you try clicking it and see if it gets the key events?
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
Rudolf Hergat
Greenhorn
Joined: Jun 21, 2012
Posts: 6
|
|
|
Yeah we tryed it but didn't help. We asked a couple of ppl to try the applet on their own computers. Turns out, the ones who have jre 6 can use the applet properly, but those who have jre 7 can't move the character.
|
 |
 |
|
|
subject: Applet in html page not reacting for keys
|
|
|