2011-01-11 62 views
0

我们正试图从本地机器的负荷仅在Internet Explorer(IE),而不是在其他浏览器加载浏览器中的Flash文件。请给我一些解决方案。如何在任何浏览器中加载Flash文件?

+0

显示您正在使用,以显示闪存文件,该文件的HTML代码。问题在那里。 – BalusC 2011-01-11 11:14:05

回答

0

这里是SWFObject的基本示例:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 
<head> 
    <title>Embedding FlowPlayer using SWFObject</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <script type="text/javascript" src="js/swfobject.js"></script> 
    <meta name="language" content="en" /> 
    <meta name="description" content="" /> 
    <meta name="keywords" content="" /> 
    <!-- SWFObject downloads and documentation: http://code.google.com/p/swfobject/wiki/documentation --> 
    <script type="text/javascript"> 
     function embedFlash() 
     { 
      var flashvarsObj = { 
      }; 
      //flashvars.config = config; 
      var paramsObj = { 
       allowScriptAccess: "sameDomain", 
       allowFullScreen: "true" 
      }; 
      var attributesObj = {}; 
      swfobject.embedSWF("swf/test.swf", "flowplayer_container", "300", "200", "10", "swf/expressInstall.swf", flashvarsObj, paramsObj, attributesObj); 
     } 
    </script> 
</head> 
<body> 
    <div id="flash_container" style="background-color:#ff0000; width:300px; height:200px;">Your SWF file will be placed here.</div> 
    <script type="text/javascript">embedFlash();</script> 
</body> 
</html> 

您也可以下载swfobject.js文件,并从我送你以前的链接expressinstall.swf文件。

祝你好运,罗布

+0

请格式化代码(我们e {}按钮)。 – weltraumpirat 2011-01-11 12:50:53

0

从您的其他答案贴在未格式化的代码块来看,你的HTML缺少<object>标签内的<embed>标签。您需要同时在所有浏览器中正确启动插件。你可以阅读关于here

你可能还是想看看swfobject,如其他答案建议。

相关问题