以前提供焦点图广告代码都有图片张数限制,这样很不方便,本文章提供这款xml + flash广告代码,可以自定图片的多少,很自由定义,希望对朋友你有帮助。
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>flash+xml焦点图轮换</title>
<script language="网页特效">ac_fl_runcontent = 0;</script>
<script src="js/ac_runactivecontent.js" language="javascript"></script>
</head><body><div align="center">
<p>
<script language="javascript">
if (ac_fl_runcontent == 0) {
alert("此页需要 ac_runactivecontent.js。在 flash 中,运行"命令"菜单中的"应用活动内容更新",以将 ac_runactivecontent.js 复制到 html 输出文件夹。");
} else {
ac_fl_runcontent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
'width', '470',
'height', '279',
'src', 'viewer',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'false',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'viewer',
'bgcolor', '#ffffff',
'name', 'viewer',
'menu', 'false',
'allowscriptaccess','samedomain',
'movie', 'viewer',
'salign', '',
'flashvars', 'xmlpath=xml/viewerdata.xml'
);
}
</script>
</p>
<noscript>
<p>
<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="445" height="200">
<param name="movie" value="viewer.swf">
<param name="quality" value="high">
<embed src="viewer.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="445" height="200"></embed>
</object>
</p>
</noscript>
</div>
</body>
</html>xml.xml文件
<!--download by http://www.111cn.net -->
<?xml version="1.0" encoding="gb2312"?>
<viewer interval="4000" israndom="1">
<item title="locoroco" img="images/01.jpg" url="http://www.111cn.net/" target="_blank" />
<item title="yahooo" img="images/02.jpg" url="http://www.111cn.net/" target="_blank" />
<item title="pata" img="images/03.jpg" url="http://www.111cn.net/" target="_blank" />
<item title="music" img="images/04.jpg" url="http://www.111cn.net/" target="_blank" />
<item title="togetoge" img="images/05.jpg" url="http://www.111cn.net/" target="_blank" />
</viewer>源码下载地址
http://down.111cn.net/down/code/js/jiaodiantu/2010/1103/21616.html
效果预览地址
http://g.111cn.net/javascript/code/20101103/fl