谷歌SWIFFY无法在IE9中工作-脚本错误'运行时.js'

Google SWIFFY not working in IE9 - Script Error 'runtime.js'

本文关键字:脚本错误 js 运行时 工作 SWIFFY IE9 谷歌      更新时间:2023-12-11

我使用谷歌的SWIFFY将我的SWF转换为HTML5。这在FF和其他浏览器上运行良好,但我在IE9中遇到了一个错误。奇怪,因为谷歌发布页面上说它支持IE9。

有办法绕过这个吗?

我正在考虑为IE Only做一个SWF Flash Player的后备。也不知道该怎么做。如果有人能帮我解决这个问题,那就太好了。非常感谢!!!

以下是HTML5文件中的代码(所有其他SWIFFY HTML文件的标准):

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Swiffy output</title>
    <script src="https://www.gstatic.com/swiffy/v5.3/runtime.js"></script>
    <script>
          swiffyobject = {"internedStrings": [
           "::::::::","::::::6Y:","::::::7E:","::::::9S:","RrRrRr::","::::::5H:","::::::8B:",
           "::::::1Q:","::::::8L:","::::::2N:","::::::8V:","::::::4K:","DdDdDd::",
           "5C5c5C5c5C5c::","::::::0J................................    
     </script>
     <style>html, body {width: 100%; height: 100%}</style>
  </head>
  <body style="margin: 0; overflow: hidden">
    <div id="swiffycontainer" style="width: 711px; height: 661px">
    </div>
    <script>
      var stage = new swiffy.Stage(document.getElementById('swiffycontainer'),
                                   swiffyobject);
      stage.start();
    </script>
  </body>
</html>

谷歌的文档实际上目前只支持IE10+。

要使用flash回退,我只需使用IE条件注释。如果浏览器是IE10+(<!--[if gt IE 9]><!--><!--<![endif]-->),则只包含快速的javascript,并回退到通过将SWF文件的HTML包装在<!--[if lte IE 9]>…中直接嵌入SWF文件。。。<![endif]-->