0

So ive been trying to use Ruffle (a flash emulator written in Rust) on a website for some flash games. This works like a charm with flash games in my website source files, but it doesnt work for iframes. This is the code that ive been trying to get working, but at this point im not sure if its possible at all. any help?

<script src="ruffle/ruffle.js"></script>
<iframe id="cppscreatorCPPS" src="https://play.cppscreator.xyz/embed/24436" scrolling="no" width="960" height="600" frameborder=0></iframe>
<br /><br />```

  • This? https://github.com/ruffle-rs/ruffle/issues/475 – Organis Apr 23 '21 at 15:38
  • No, this is an issue relating to the ruffle EXTENSION and not ruffle self-hosted for websites. also its likely outdated anyways, because its from last year, and because ruffle has nightly builds, I would imagine that this has been weeded out long ago. – cupofdirtfordinner Apr 23 '21 at 20:20
  • Ok, another possibility, then. Long ago I was working with external assets in Flash and found out that Flash (or rather browser on behalf of Flash Plugin) treats relative URLs as relative to the top document location (rather than page that hosts the Flash application or main SWF file). You might want to turn on any web console you are using and monitor resource requests from iframe. – Organis Apr 23 '21 at 22:11

1 Answers1

0

Instead of an <iframe>, I would recommend you used an <object> and <embed>component. I will leave a code snippet below (You need to replace the value of the param and the src of the embed with your swf file link. In your case, it is the play.cppscreator.xyz/embed link. ). Also, you are using cppscreator.xyz, which does not really work, as it is not an SWF file.

<script src="https://flash-games.penguinbotcoder.repl.co/ruffle/ruffle.js"></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>
  • I confirm that the object and embed solution is working fine! I am using it in my site in order to convert all old swf so they are still visible and usable. Actually I use this first line in the code: – passegua Sep 08 '22 at 15:24