-
Notifications
You must be signed in to change notification settings - Fork 112
/
example_ruffle.html
44 lines (39 loc) · 1.53 KB
/
example_ruffle.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!--
Waning this emulator is still a work in progress, and not 100% of apis have been implemented
so don't expect compatibility with all .swf files.
* Download latest nightly selfhosted build from
https://ruffle.rs/#downloads
and extract to the emulators folder.
* in the examples folder save
https://web.archive.org/web/20080721095815im_/http://70.85.12.163/albino_flash02/end(www.albinoblacksheep.com).swf
* Visit your example_ruffle.html file with a modern
Javascript-capable browser.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>example computer program</title>
</head>
<body>
<div id="container"></div>
<canvas id="canvas" style="width: 780px; height: 440px; display: block; margin: 0 auto;" moz-opaque=""></canvas>
</body>
<foot>
<script type="text/javascript" src="es6-promise.js"></script>
<script type="text/javascript" src="browserfs.min.js"></script>
<script type="text/javascript" src="loader.js"></script>
<script type="text/javascript">
const url = "/examples/end(www.albinoblacksheep.com).swf";
const file = url.slice(url.lastIndexOf("/"));
var emulator = new Emulator(
document.querySelector("#canvas"),
null,
new RuffleLoader(
RuffleLoader.emulatorJS("emulators/ruffle/ruffle.js"),
RuffleLoader.mountFile(file, RuffleLoader.fetchFile("Game File", url)),
)
);
emulator.start({ waitAfterDownloading: true });
</script>
</foot>
</html>