— 1 —
让 flash 自适应浏览器分辨率(网页 flash 全屏代码)
首先新建 html 文件,将下面的代码考入:
<html xmlns=" http://www.w3.org/1999/xhtml " xml:lang="zh-CN" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>2</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body bgcolor="#302f2d" style="margin:0 auto;padding:0; text-align:center">
<script type="text/javascript">
function che(a){
w=screen.availWidth-22;
h=w*620/1000;
if(a == 1) return h;
else return w;
}AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=7,0,19,0','width',che(0),'height',che(1),'src','2','quality','high','pluginspage','http://www.macromedia.com/go
/getflashplayer','movie','2' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 "
width="1000" height="620">
<param name="movie" value="2.swf">
<param name="quality" value="high">
<embed src="2.swf" quality="high" pluginspage=" http://www.macromedia.com/go/getflashplayer "
type="application/x-shockwave-flash" width="1000" height="620"></embed>
</object>
</noscript>
</body>
</html>
解释下: embed src="2.swf" 为 flash 的路径和文件名字,这个大家自己改下就可以了。宽度和高度看下自
己制作 flash 是多少照填就行。
接下来在 html 所在路目录下新建文件夹命名 “Scripts ”在该文件夹下新建 js 文件 “AC_RunActiveContent”考
入下面的代码并保存。