{% extends 'bloonsa_game/base.html' %}
{% load static %}

{% block title %}
    {{ levelTitle }} by {{ levelAuthor }}
{% endblock title %}

{% block head %}

{% endblock head %}

{% block content %}
<!--<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        codebase="{% static 'bloonsa_game/misc/swflash.cab' %}#version=7,0,19,0"
        width="640" height="480" title="" allowScriptAccess=true>
<param name="movie" value="{% static 'bloonsa_game/misc/bloons_unlimited.swf' %}">
<param name="quality" value="high">
<param name="allowscriptaccess" value="always" />
<embed src="{% static 'bloonsa_game/misc/bloons_unlimited.swf' %}"
       quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
       type="application/x-shockwave-flash"
       width="640" height="480" allowScriptAccess=true>
</object>-->
<div id="bloonsa-game" allowScriptAccess=true></div>
<script>
    window.RufflePlayer = window.RufflePlayer || {};
    window.addEventListener("load", (event) => {
        const ruffle = window.RufflePlayer.newest();
        const player = ruffle.createPlayer();
        const container = document.getElementById("bloonsa-game");
        container.appendChild(player);
        player.load({
            url: "{% static 'bloonsa_game/misc/bloons_unlimited.swf' %}",
            allowScriptAccess: true,
            backgroundColor: "#000",
         });
        player.style.width = "640px";
        player.style.height = "480px";
    });
</script>

{% endblock content %}