• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Keyboard Events not working on Newgrounds.com

S

Sam (Deleted User)

Guest
I doubt this is specific to new grounds. It must be the way they handle iframes and other websites doing it will also have problems. I thought I read somewhere this was resolved. Changing runtimes to and older/newer one might help that came before/after the breakage. But I'm not sure if you are experiencing the same issue I read about and really the HTML5 export is so broken I never really used it ever since I purchased it (I was hoping for better when I bought it thinking they may have gotten their sh*t together after getting help with YellowAfterlife with all those bugs but apperently it didn't take long for it to go back to being broken again).
 

Padouk

Member
Hello I've have a project where the keyboard events work locally but for the version I uploaded to Newgrounds.com
BOOM DESTRUCTION Trial (newgrounds.com)
It doesn't work, someone help please thanks
Ahoy.
That's a common security issue to avoid keyloggers and click bait from hidden iframes.
To put it simple, make sure the Player click on your canvas first. (You will need at least one click before any keypress and sound and etc... you probably already know that).
During that click, also make sure your iframe and canvas have focus.

Read this for a 2 line fix in your index.html before deployment
 
Last edited:
Top