Flash圖片輪換顯示的效果抽取
效果一覽: 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>動(dòng)態(tài)圖片的顯示</title>
</head>
<body>
靜態(tài)賦值:<br />
<embed width="260" height="198"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" quality="high" false=""
flashvars="config=1|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000&bcastr_flie=1.jpg|2.jpg|3.jpg|4.jpg|5.jpg&bcastr_link=http://www.baidu.com|http://www.google.com|http://www.sina.com.cn|http://bbs.crsky.com|http://www.aygfsteel.com/supercrsky&bcastr_title=百度|谷歌|新浪|霏凡|我的博客&menu="
wmode="opaque" src="focus.swf" />
<script>
var str = "";
//圖片輪詢間隔時(shí)間(秒)
str += "config=5|";
//下標(biāo)顏色
str += "0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000";
//圖片位置
str += "&bcastr_flie=1.jpg|2.jpg|3.jpg|4.jpg|5.jpg";
//圖片鏈接
str += "&bcastr_link=http://www.baidu.com|http://www.google.com|http://www.sina.com.cn|http://bbs.crsky.com|http://www.aygfsteel.com/supercrsky";
//圖片顯示文字
str += "&bcastr_title=百度|谷歌|新浪|霏凡|我的博客&menu=";
</script>
<hr />
通過(guò)JavaScript賦值: <br />
<embed width="260" id="s" height="198"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" quality="high" false=""
flashvars=""
wmode="opaque" src="focus.swf"/>
<script>
var s = document.getElementById("s");
//s.flashvars = str;
s.setAttribute("flashvars", str);
</script>
<hr />
通過(guò)查詢數(shù)據(jù)庫(kù)賦值:
這里就不寫(xiě)了,把數(shù)據(jù)取出來(lái)后給flashvars=""賦值就行.用EL或標(biāo)簽什么的都行.
只要注意那幾個(gè)固定參數(shù)的含義就行了.
</body>
</html>
需要focus.swf我已經(jīng)打包在源碼里了.
源碼下載






































s.setAttribute("flashvars", str);







需要focus.swf我已經(jīng)打包在源碼里了.
源碼下載
posted on 2008-07-10 17:20 々上善若水々 閱讀(4412) 評(píng)論(7) 編輯 收藏