0

I'm currently working on a miniclip-newgrounds-like website with old flash games. I really don't know how to embed flash files now, the new UI kind of confuses me. Of course, flash won't work anymore so I have to embed ruffle flash emulator.

How can I do these stuff?

Thanks.

  • 1
    **Ruffle** has a pretty low compatibility with **AS1/2** and almost no compatibility with **AS3**: https://ruffle.rs/#compatibility I don't think there's any point to bother at the present moment, it is quite possible you won't be able to actually play **ANY** of the games you want. – Organis Feb 18 '21 at 18:48
  • This doesn't solve my problem though. –  Feb 19 '21 at 13:23
  • That's why I posted a comment (that saves you a great deal of time and effort, BTW, by not letting you go into the dead end direction) rather than an answer, right? – Organis Feb 19 '21 at 14:33
  • @Organis: A pretty large number of AS1/2 games play just fine on Ruffle. Some with glitches, but not entirely unplayable. I wouldn't cite that as a reason not to deploy Ruffle. Someone familiar with Google Sites would be in a better position to answer this. I don't imagine it being feasible though, if my impression of the platform is anything like the reality. – BoltClock Apr 22 '21 at 16:26

3 Answers3

0

This is actually possible. In the new google sites, You have embed components which allow you to embed ruffle. The snippet below should work. You can replace script src to your ruffle script, But I already put one there for you. Change the object's height and width to whatever you like. Change the movie value and embed src to your flash game swf link. E.G. https://sites.google.com/view/penguinpoint/community it will take some time to load, though.

<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<object width="600" height="400">
    <param name="movie" value="https://flash-games.penguinbotcoder.repl.co/flashgames/thinice.swf">
    <embed src="https://flash-games.penguinbotcoder.repl.co/flashgames/thinice.swf">
    </embed>
</object>
nosamu
  • 5
  • 3
0

Thank you very very much for this code! I am happily using it in my site so I could run again hundreds of old but nice swf file! I wonder if it's possible to add a "autoplay" or "autostart" feature to this piece of code.

<script src="https://www.sinapsi.org/public/ruffle/ruffle.js"></script>
<object width="750" height="550">
<param name="movie" value="https://www.sinapsi.org/public/espressione01.swf">
<embed src="https://www.sinapsi.org/public/espressione01.swf">
</embed>
</object>
passegua
  • 71
  • 1
  • 7
0

Use the embed option and link to your swf file. Here is some embed code to put into it. I also use this on WIX. It now plays AS2 great. The code auto plays.

<script>
window.RufflePlayer = window.RufflePlayer || {};
window.RufflePlayer.config = {
    "autoplay": "on","splashScreen": false,"unmuteOverlay": "hidden"
};

    window.addEventListener("load", (event) => {
        const ruffle = window.RufflePlayer.newest();
        const player = ruffle.createPlayer();
        const container = document.getElementById("container");
        container.appendChild(player);
        player.load("https://example.com/Your-Movie.swf");
        player.style.width = "700px";
        player.style.height = "400px";
    });
</script>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<div id="container"></div>
nosamu
  • 5
  • 3