I have added Ruffle Flash Player to my Squarespace site and tried to get SWF files to play but they appear blank or I get error messages. I have one v ersion where I pull in the swf file from my WIX site and it plays fine. Another version I uploaded a file as a swf and copied the URL from the link and added that to my code and that didn't work. I shortened the URL to s/filename.swf and that didn't work. I then tried uploading the swf file to GDrive and created a usable link and that didn't work. Since the version from my WIX site works but the others do not I am clueless. I know it isn't the Ruffle embed code. It must eitehr be the file destination is wrong or something. An example is here: https://www.steveknowswebdesign.com/blog/blog-post-title-one-g5meg . The code looks like this:
<script>
window.RufflePlayer = window.RufflePlayer || {};
window.RufflePlayer.config = {
"autoplay": "on","autoplay": "on", "splashScreen": false
};
window.addEventListener("load", (event) => {
const ruffle = window.RufflePlayer.newest();
const player = ruffle.createPlayer();
const container = document.getElementById("container");
container.appendChild(player);
player.load("https://static.wixstatic.com/media/f294ab_ec872178e8b34f369df633d44c4edfaa.swf");
player.style.width = "700px";
player.style.height = "400px";
});
</script>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<div id="container"></div>
I know people think Flash is dead and don't usually understand that the need for a plugin is gone and WASM is being used in its place which is secure. But that's another story.