Google SWIFFY无法在IE9中运行 - 脚本错误'runtime.js'

时间:2013-11-28 19:36:37

标签: javascript flash html5-canvas google-swiffy

我使用Google的SWIFFY将SWF转换为HTML5。这在FF和其他浏览器上工作正常,但我在IE9中遇到错误。很奇怪,因为谷歌发布页面说它支持IE9。

有没有办法解决这个问题?

我正在考虑为仅限IE的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>

1 个答案:

答案 0 :(得分:1)

Google的文档实际上目前声称只支持IE10 +。

要使用闪回后备,我只需使用IE条件注释。如果浏览器是IE10 +(<!--[if gt IE 9]><!--> ... <!--<![endif]-->),则只包含漂亮的javascript,并通过将其HTML包装在<!--[if lte IE 9]>中来直接嵌入SWF文件... {{1 }}