52 lines
2.3 KiB
HTML
52 lines
2.3 KiB
HTML
<!DOCTYPE html >
|
|
<script src="https://agi.armorgames.com/ruffle/ruffle.js"></script>
|
|
|
|
<html lang="en" xml:lang="en">
|
|
<head>
|
|
<title>Games4 - Happy Wheels</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.png" />
|
|
<link rel="stylesheet" href="../styles.css">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<a href="../index.html"><img src="../images/logo.png" alt="Games4" class="logo"></a>
|
|
<div class="game-container">
|
|
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
|
|
<div id="flash-container"></div>
|
|
<script>
|
|
window.RufflePlayer = window.RufflePlayer || {};
|
|
|
|
let player; // make it accessible
|
|
|
|
window.addEventListener("load", (event) => {
|
|
const ruffle = window.RufflePlayer.newest();
|
|
player = ruffle.createPlayer();
|
|
const container = document.getElementById("flash-container");
|
|
container.appendChild(player);
|
|
player.load("flash-files/HappyWheels.swf");
|
|
});
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
const btn = document.getElementById("fullscreen-btn");
|
|
|
|
btn.addEventListener("click", () => {
|
|
const elem = document.getElementById("flash-container");
|
|
|
|
if (elem.requestFullscreen) {
|
|
elem.requestFullscreen();
|
|
} else if (elem.webkitRequestFullscreen) { // Safari
|
|
elem.webkitRequestFullscreen();
|
|
} else if (elem.msRequestFullscreen) { // IE11
|
|
elem.msRequestFullscreen();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
<button id="fullscreen-btn">Fullscreen</button>
|
|
<p>this is just the demo version. im trying to get the full version but for now you just have to deal with this.</p>
|
|
</div>
|
|
</body>
|
|
</html>
|