Responsive iframe containing c2 app

0 favourites
  • 1 posts
From the Asset Store
This kit will show you how to position GUI elements based on screen size
  • Hello,

    I have developed an app with HTML 5 and ECMAscript. I have wrapped my site with node-webkit.

    I have games developed with construct 2 they are embedded in an Iframe I have set the Iframe properties to match those of the games.

    The HTML looks something like:

    <div id="iframeContainer"><div id="iframeSpacer"></div></div>

    I then use createElement("iframe") assign properties and append. I need a spacer because there is a top navigation bar with CSS max-width set to 70px.

    I want to resize the games on start up and resize. The app is responsive.

    I can communicate between iframe and parent no problem.

    I achieve resize when adjusting c2canvas CSS height. However the mouse pointer is slightly off. If I then call cr_size canvas and pass iframe width and height as args, it seems to undo resize.

    Is this possible? Do I use cr_sizeCanvas? I have tried manipulating iframe, c2canvasdiv and c2canvas width and height attributes and CSS. So far no luck.

    Please help, it is withhelding me from handover. The team that developed their games do have a pro licence if needed.

    Thank you,

    Dagan

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)