Jump to content

Running in an iframe


StarBright
 Share

Recommended Posts

I need to adapt my game to run in an iframe. Currently my index.html looks like this:

<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>TypeScript HTML App</title>
    <link rel="stylesheet" href="app.css" type="text/css" />
    <script src="phaser.js"></script>
    <script src="game.js"></script>
</head>
<body>

    <div id="content"></div>
</body>
</html>

 with the game constructor containing the line

super(1200, 800, Phaser.AUTO, 'content', null);

How do I get the game into an iframe, and then how do I make it scale to the appropriate size?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...