"On any key press" not working in HTML5 for web export

0 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Problem Description

    When exporting the project as HTML for web with extra space for ads (in this case 160px on the right) there are two issues (can be seen in examples below)

    1. In FF there is a "fantom" overflow, couple of pixels on the bottom of the page

    2. "Press any key" is not working until you click on the canvas to "get it in focus" and then click...

    Open the folowing link in FF: https://dl.dropboxusercontent.com/u/611 ... index.html

    Press down arrow on keyboard, you will see some scroling happen (couple of px). "Press any key" event should be triggered once you pressed down arrow, however, you must first click on the layout and then press any key to trigger "Press any key" event and go to next layout.

    When you export the project without 160px ad space, then no scrolling is happening when you press down arrow, and "Press any key" event is triggered immediately, can be seen here: https://dl.dropboxusercontent.com/u/611 ... index.html

    Attach a Capx

    https://dl.dropboxusercontent.com/u/6116050/c2bug.capx

    Description of Capx

    Basic platformer setup with 2 layouts, on first layout only one event is defined "On any key press go to layout 2"

    Steps to Reproduce Bug

    • Export game as HTML5 with 160px (or any other number) margin for ads on the right (or left?)
    • Uplaod to server
    • Open game in browser (FF will have an extra bug, see above)

    Observed Result

    In FF some scrolling happens (couple of px), and "Press any key" is not working until you firs click on game canvas.

    Expected Result

    No scrolling should happen and "press any key" should work without first clicking on the gmae canvas.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 8.1 Pro

    Construct 2 Version ID

    Relese 206 64bit

  • Is this not a bug? Does anyone from Scirra even read this posts? It's been a week now and no one reponded. Isn't my description of the "bug" detailed enough?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Is this not a bug? Does anyone from Scirra even read this posts? It's been a week now and no one reponded. Isn't my description of the "bug" detailed enough?

    there is no problem on my side.. both of them scrolls perfect... there is a slight miss alignment of the background but that can be fixed i think from the project.. the rest i see works perfect .. it may be ur browsers. since u encountered it and it may be stuck in the cache. try eliminating cache on your browsers and retest them.. there is no issue here ....

    for the clicking before press any key maybe be because the game is in pause mode or smth.. it also maybe cause of the firefox itself.. they are consistently upgrading.. regardless of google (which forgot to update lately)

    as for IE who uses it anymore?

  • I can't reproduce issue 1 in Firefox Nightly, which suggests it may be a Firefox bug they've already fixed. Can you test with Nightly and see if there is still an issue?

    Issue 2 is an intentional feature of browsers, added for security reasons. To prevent hidden iframes acting as a keylogger, you have to click inside an iframe before it can get any keyboard input. This is a normal feature that applies to any HTML web page.

    Please remember that due to developer and release schedules we ask that you allow a few weeks for bugs to be investigated, which is covered in the bug report FAQ.

  • getting the same issue

    1. add event -> keyboard x is down set animation to xxxxx // expected changes animation

    2. test works changes animation // as expected animation changed

    3. changing keyboard x to on pressed x set animation to xxxxx // expected changes animation

    4. test: Failed: animation is not changed to xxxxx // nothing happens

    5. changing keyboard x to on pressed x play sound xxxxx // expected sound is played

    6. test: sucess!: sound is played! // as expected sound is played

    so it seems there is some thing wrong with the "on pressed" it does not trigger animations, but sounds do work ..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)