<!--焦点图开始-->
<script type="text/javascript">
<!--
var focus_width=250; ------ flash的宽度
var focus_height=160; ------ flash的高度
同样可以加上背景颜色
var focus_bgcolor=160; ------ flash的背景颜色 调用方式: bgcolor="'+focus_bgcolor+'"
以下的代码是闪烁的图片地址.注意以 "|" 分开及结尾
var pics = "http://cimg.163.com/auto/2005/10/29/200510291030463e9bb.jpg|[img]http://cimg.163.com/auto/2005/10/28/200510281607140328c.jpg|http://cimg.163.com/auto/2005/10 ... pst_248158_1020.jpg[/img]|";
以下的代码是闪烁的图片相对应的链接地址.注意以 "|" 分开及结尾
var links = "http://auto.163.com/05/1028/14/215K0HP3000816I7.html|http://auto.163.com/special/y/00 ... 1GM3/temp_001.html|";
这个是6.0的FLASH嵌入版本, 更高版本可以参照"
<OBJECT codeBase=http://fpdownload.macromedia.com/get/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 height=170 width=480 classid=clsid: D27CDB6E-AE6D-11cf-96B8-444553540000>
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ focus_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="http://cimg.163.com/auto/main-1.swf"><param name="quality" value="high"><param name="bgcolor" value="#D6D3D6">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&focus_width='+focus_width+'&focus_height='+focus_height+'">');
document.write('<embed src="http://cimg.163.com/auto/main-1.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&focus_width='+focus_width+'&focus_height='+focus_height+'" menu="false" bgcolor="#D6D3D6" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
//-->
</script>
<!--焦点图结束-->
同样的代码,但是效果比这个好看一点
演示: http://www.jsvnet.com/
CODE:[Copy to clipboard]<HTML>
<HEAD>
<TITLE></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</HEAD>
<BODY>
<!-- 动态图开始 -->
<SCRIPT language=JavaScript>
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[4] ='http://www.jsvnet.com/jsvnet/bigimg/435_165_bbvod.jpg';imgLink[4]='http://www.bbvod.net/MovieSpecial/FilmMovieSpecial.aspx?site=6&FilmId=213';
imgUrl[2] ='http://www.jsvnet.com/jsvnet/bigimg/435_165_v1.jpg';imgLink[2]='http://v1.js.chinavnet.com/ClipDetails.aspx?TypeId=175&ClipId=56341&PlayOrDown=1';
imgUrl[3] ='http://www.jsvnet.com/jsvnet/bigimg/435_165_zd.jpg';imgLink[3]='http://js.zdedu.com.cn/hd.htm';
imgUrl[1] ='http://www.jsvnet.com/jsvnet/bigimg/435_165_music.gif';imgLink[1]='http://topic.9sky.com/GetTopic.ASP?ZTID=20051021&AllianceName=topic_ENJOII';
imgUrl[5] ='http://www.jsvnet.com/jsvnet/bigimg/435_165_tv.jpg';imgLink[5]='http://tv.js.chinavnet.com/index.htm';
imgUrl[6] ='http://www.jsvnet.com/jsvnet/bigimg/435_165_vod.jpg';imgLink[6]='http://vod.js.chinavnet.com/ClipDetails.aspx?TypeId=87&ClipId=7828&PlayOrDown=1';
var j=0;
for (i=1;i<7;i++) {
if( (imgUrl!="") && (imgLink!="") ) {
j++;
} else {
break;
}
}
function setTransition(){
if (document.all){
imgInit.filters.revealTrans.Transition=Math.floor(Math.random()*20);
imgInit.filters.revealTrans.apply();
}
}
function playTran(){
if (document.all)
imgInit.filters.revealTrans.play();
}
//var key=0;
function nextAd()
{
if(adNum<j)adNum++ ;
else adNum=1;
if (document.all){
setTransition();
playTran();
}
for (a=1;a<=j;a++)
{
if (a==adNum)
document.images["num"+a].src="images/gifno-"+a+"_"+a+".gif";
else
document.images["num"+a].src="images/gifno-"+a+".gif";
}
document.images.imgInit.src=imgUrl[adNum];
theTimer=setTimeout("nextAd()", 5000);
}
function changimg(m)
{
if(adNum<m)adNum++ ;
else adNum=1;
for (a=1;a<=j;a++)
{
if (a==m)
document.images["num"+a].src="images/gifno-"+a+"_"+a+".gif";
else
document.images["num"+a].src="images/gifno-"+a+".gif";
}
document.images.imgInit.src=imgUrl[m];
}
function goUrl(){
jumpUrl=imgLink[adNum];
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '')
window.open(jumpUrl,jumpTarget);
else
location.href=jumpUrl;
}
}
</SCRIPT>
<!-- 动态图结束 --><table width=445 height="175" border='0' cellpadding='0' cellspacing='0' style="border: 1 solid #B3B0B7">
<tr>
<td align="center"><div id="Layer1" style="position:absolute; 435px; height:20px; z-index:1">
<table width="435" height="20" border="0" cellpadding="1" cellspacing="2">
<tr>
<td valign="bottom">
<div align="right">
<script language=javascript>
for (b=1;b<=j;b++)
{
document.write('<img name=num'+b+' // border=0 onClick=changimg('+b+') style=cursor:hand;>');
} </script></div> </td>
</tr>
</table></div>
<a href='javascript:goUrl()'>
<img style="FILTER: revealTrans(duration=1,transition=5);color:#000000" src=javascript:nextAd() width=435 height=165 border=0 name=imgInit></a></td>
</tr>
</table>
<table width="446" border="0" cellpadding="1" cellspacing="0" style="border-color:#69abdb; border-style:solid; border-1px; font-size:9pt ">
<tr>
<td width="42" valign="middle" bgcolor="#C8E2FD"><img src="images050929/text_1.gif" width="41" height="23"></td>
<td width="398" bgcolor="#C8E2FD"><marquee onmouseover='this.stop()' onmouseout='this.start()' scrollDelay=110>
<a href="http://www.nmufh.cn/show.asp?Id=4117" target="_blank"><font color="1a2986">告别乙肝大小三阳每月只需一针</font></a>
</marquee>
</td>
</tr>
</table>
</BODY>
</HTML>
刚打开网站的时候 全屏FLASH的广告代码.
CODE:[Copy to clipboard]<script language="javascript">
<!--
SYfullscreen=false;
today=new Date();
function testdate()
{
if(today.getHours()>='9' && today.getHours()<='23')
{
adInterPath='http://www.jsvnet.com/free/full.swf';
SYfullscreen=true;
}
}
testdate();
if(SYfullscreen==true)
{
if (document.all) {
// this is a 4.x browser, no?
document.write('<SCRI' + 'PT LANGUAGE="javascript1.2"');
document.writeln(' SRC="time.js"></SCR' + 'IPT>');
}
}
// -->
</script>
<script language="javascript">
<!--
if(SYfullscreen==true)
{
if (document.all) {
// this is a 4.x browser, no?
document.write('<DIV ID="hiddenLayer" style="display: none; height: 381px;">');
if (getsGlu) {
expandableIframe = '<IFRAME id="interstitialframe" width=778 HEIGHT=480 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0></IFRAME>';
document.write(expandableIframe);
}
}
document.write('</div>');
}
// -->
</script>
两侧FLASH代码.同时关闭
CODE:[Copy to clipboard]<SCRIPT FOR='jsvnet' EVENT='FSCommand()' LANGUAGE='JavaScript'>
jsvnetleft.style.visibility='hidden';
jsvnet_right.style.visibility='hidden';
</script>
<script language="JavaScript" src="jsvnet.js"></script>
JSVNET.JS
CODE:[Copy to clipboard]function winload()
{
jsvnetleft.style.top=20;
jsvnetleft.style.left=5;
jsvnet_right.style.top=20;
jsvnet_right.style.right=5;
}
if(document.body.offsetWidth>800){
{
if(document.body.offsetWidth>800){
{
document.write("<div id=jsvnetleft style='position: absolute;visibility:visible;z-index:1'><EMBED src='http://www.jsvnet.com/114ad/flash/jsdl.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=jsvnet wmode=opaque></EMBED></div>"
+"<div id=jsvnet_right style='position: absolute;visibility:visible;z-index:1'><EMBED src='http://www.jsvnet.com/114ad/flash/jsdl2.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=jsvnet wmode=opaque></EMBED></div>");
}
winload()
}
}
winload()
}