插入flash 库文件,使flash透明源码

tag:SwfObject 2.2版本-透明

这里只说index_dynamic.html这种调用方式的透明方法index调用的直接加参数就行了。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SWFObject 2 dynamic publishing example page </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"> </script>
<script type="text/javascript">
swfobject.embedSWF("test.swf", "myContent", "300", "120", "9.0.0", "expressInstall.swf");
</script>
</head>
<body>
<div id="myContent">
<h1>Alternative content </h1>
<p> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a> </p>
</div>
</body>
</html>

 

方法是在调用时加入

var flashvars = {}
var attributes = {}
var params ={allowFullScreen:'true',allowScriptAccess:'always',quality:'high',wmode:'Transparent'}
swfobject.embedSWF(
"test.swf", "myContent", "300", "120","9.0.0","expressInstall.swf",flashvars,params,attributes)

 

试试看是不是透明了?

 

你可能感兴趣的:(插入flash 库文件,使flash透明源码)