首页 > 解决方案 > 有没有办法在 2021 年谷歌网站中嵌入 .swf 文件和褶边 Flash 播放器?

问题描述

我目前正在开发一个类似 minilip-newgrounds 的网站,其中包含旧的 Flash 游戏。我现在真的不知道如何嵌入 Flash 文件,新的 UI 让我感到困惑。当然,flash 不再起作用了,所以我必须嵌入 ruffle flash 模拟器。

我该怎么做这些东西?

谢谢。

标签: flashgoogle-sitesruffle

解决方案


这实际上是可能的。在新的谷歌网站中,您已经嵌入了允许您嵌入褶边的组件。下面的代码段应该可以工作。您可以将 script src 替换为您的 ruffle 脚本,但我已经为您放了一个。将对象的高度和宽度更改为您喜欢的任何内容。将值 src 更改为您的 Flash 游戏 swf 文件。将 embed src 更改为您的 flash 游戏 swf 文件。EG https://sites.google.com/view/penguinpoint/community加载需要一些时间。

<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>


推荐阅读