网页经常需要嵌入Flash文件,但嵌入的Flash往往有边框,需要点击下才消失;
同事从网上找来了js文件,在需要嵌入Flash的Html文件里引用js文件就可以解决问题;
swfobject.js文件能解决Flash边框,通过SWFObject实例化对象,“网页中要播放的Flash.swf”是你要在Html网页中播放的Flash,800、600分别是宽度和高度
<div id="flashcontent"></div>用于显示Flash的层
swfobject.js下载:/Files/ProgrammerSystem/swfobject.js
相关参考资料:http://blog.deconcept.com/swfobject/
同事从网上找来了js文件,在需要嵌入Flash的Html文件里引用js文件就可以解决问题;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>移除Flash边框</title>
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<div id="flashcontent"></div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("网页中要播放的Flash.swf", "sotester", "800", "600", "9", "#FF6600");
so.addVariable("flashVarText", "this is passed in via FlashVars for example only"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
so.write("flashcontent");
// ]]>
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>移除Flash边框</title>
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<div id="flashcontent"></div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("网页中要播放的Flash.swf", "sotester", "800", "600", "9", "#FF6600");
so.addVariable("flashVarText", "this is passed in via FlashVars for example only"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
so.write("flashcontent");
// ]]>
</script>
</body>
</html>
swfobject.js文件能解决Flash边框,通过SWFObject实例化对象,“网页中要播放的Flash.swf”是你要在Html网页中播放的Flash,800、600分别是宽度和高度
<div id="flashcontent"></div>用于显示Flash的层
swfobject.js下载:/Files/ProgrammerSystem/swfobject.js
相关参考资料:http://blog.deconcept.com/swfobject/