SteveKnowsWeb Posted February 5 Posted February 5 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.
tuanphan Posted February 7 Posted February 7 I see first item still works here Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
SteveKnowsWeb Posted February 7 Author Posted February 7 Yes. That swf file is from another website. So CORs isn't the issue. I believe it is the upload files area. Possibly the address isn't correct or something. It should be /s/filename.swf I think.
SteveKnowsWeb Posted February 8 Author Posted February 8 I found the problem but I am getting NO help from Squarespace help on Twitter. Basically they are saying not my problem. Helpful bunch there, not. The problem is the shortened fake URLs for the file uploads. WHen I upload a file I get /s/filename.pdf but the true URL is something like "https://static1.squarespace.com/static/65a5947492341f05800eb9fb/t/65c50797a38acc4b1615c1e8/1707411352613/filename.pdf. So Squarespace appears to generate folders. I tried to replicate this with the swf file but can't get the source to find the actual URL. I guess I just need a way to find the true file address. ANybody have an idea?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment