User Tag List

Results 1 to 5 of 5

Thread: Another Odd Problem with iFrames and HTML5

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jan 2010
    Posts
    518
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Another Odd Problem with iFrames and HTML5

    Hi,
    I have found a bizarre quirk that occurs with HTML5 apps that are in iframes. Sometimes, but not always, buttons (Active System Boxes) on the app won't be clickable.
    For example, here:
    http://biomanbio.com/HTML5GamesandLa...html5page.html

    Sometimes I try to click "Start a New Game" in Chrome and I can't (nothing happens). Feel free to test. I have discovered that if I then click outside of the iframe, it then allows the iframed app to work again. So, you have to click outside of the iframe, and then click the button and all is well. This is obviously not very intuitive. Why does this occur? I have no idea. It is super-annoying though and I doubt most of my users will be game for clicking all over the place experimentally, hoping that the game somehow magically activates. Does anyone have any insights why this might occur or how to solve it? I don't even think it has anything to do with the Fusion-generated app. It seems to have more to do with something that has changed in Chrome. Any insights would be great! Thanks,
    Brett

  2. #2
    Clicker Fusion 2.5Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    advaith's Avatar
    Join Date
    Jun 2015
    Location
    SF Bay Area, California, USA
    Posts
    1,325
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well for me (on my game) when you click out of the frame the game will pause and you have to click in the gray area to resume.

    Example 1
    Example 2

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jan 2010
    Posts
    518
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi Advaith,
    The problem is essentially the same, as it turns out, even though it seems opposite in the way it works. Here is how it was solved (quoted from another thread):

    "The Iframe must have an ID that you can set focus to. In the following example it is expected that the iframe has the id 'iframe_canvas'.

    This is the javascript then needed in the parent html doc that also contains the iframe tag. Basicly it reverts focus back to the iframe every 1 second. Unfortunately the function has to run every 1 sec, as you cannot test for iframe focus lost, as not all browers seem to support that.

    <script>
    function setFocusIframe() {
    var iframe = document.getElementById("iframe_canvas");
    iframe.contentWindow.focus();
    }
    setInterval(setFocusIframe, 1000);
    </script>

    "

  4. #4
    Clicker Fusion 2.5Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    advaith's Avatar
    Join Date
    Jun 2015
    Location
    SF Bay Area, California, USA
    Posts
    1,325
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    So does that code go in the iframe or the main page?

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jan 2010
    Posts
    518
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It goes in the main page.

Similar Threads

  1. HTML5 problem on iPad
    By MTCMusic in forum HTML5 Export Module 2.5
    Replies: 4
    Last Post: 19th July 2015, 05:59 PM
  2. Problem recognizing a touch in html5
    By mobichan in forum HTML5 Export Module 2.5
    Replies: 6
    Last Post: 30th June 2015, 08:23 PM
  3. problem fps html5 app
    By matte in forum HTML5 Export Module 2.5
    Replies: 3
    Last Post: 17th September 2014, 10:35 AM
  4. HTML5 Video Problem - Probably I'm doing something wrong...
    By Daryiel in forum HTML5 Export Module 2.5
    Replies: 4
    Last Post: 4th August 2014, 06:24 AM
  5. Problem creating HTML5 Final Build?
    By thecatamites in forum HTML5 Export Module 2.5
    Replies: 7
    Last Post: 6th March 2014, 05:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •