查看效果:http://keleyi.com/keleyi/phtml/flash/
以下是HTML文件代码:
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta name="keywords" content="JS代码,焦点图,JS广告代码,JS特效代码" /> 6 <meta name="description" content="此代码内容为可调节尺寸的banner广告条效果,属于站长常用代码,更多焦点图代码请访问柯乐义JS代码频道。" /> 7 <title>横条广告带上下滚动_柯乐义</title><base target="_blank" /> 8 </head> 9 <body style="text-align:center"> 10 <h2>横条广告带上下滚动</h2> 11 <div id="ad_headerbanner"><SCRIPT src="http://keleyi.com/keleyi/phtml/flash/js/keleyi.falsh.js" type=text/javascript></SCRIPT> 12 13 <SCRIPT type=text/javascript> 14 <!-- 15 var fp_pics="",fp_links=""; 16 //广告图片与链接 17 fp_pics += "§"+"http://keleyi.com/keleyi/phtml/flash/images/w1.jpg"; //广告图片地址 18 fp_links += "§"+escape("http://keleyi.com/a/bjac/3wjq3xm2.htm"); //广告链接地址 19 //广告图片与链接 20 fp_pics += "§"+"http://keleyi.com/keleyi/phtml/flash/images/w2.jpg"; //广告图片地址 21 fp_links += "§"+escape("http://keleyi.com/a/bjac/06r1x7tg.htm"); //广告链接地址 22 //广告图片与链接 23 fp_pics += "§"+"http://keleyi.com/keleyi/phtml/flash/images/w3.jpg"; //广告图片地址 24 fp_links += "§"+escape("http://keleyi.com/a/bjac/gucmqug3.htm"); //广告链接地址 25 fp_pics=fp_pics.substring(1); 26 fp_links=fp_links.substring(1); 27 //默认图片与链接 28 var def_pic = "images/w2.jpg"; //默认图片地址 29 var def_link = escape("http://keleyi.com/"); //默认图片链接 30 31 var FP = new zadaiFlash("http://keleyi.com/keleyi/phtml/flash/flipper.swf", "FP_L_swf", 950, 90, "7", "#FFFFFF", false, "High"); 32 FP.addParam("menu", "false"); 33 FP.addParam("wmode", "transparent"); 34 FP.addVariable("pic_width", "950"); //图片宽 35 FP.addVariable("pic_height", "90"); //图片高 36 FP.addVariable("flip_time", "300"); //翻牌速度 37 FP.addVariable("pause_time", "2000"); //间隔时间 38 FP.addVariable("wait_time", "2000"); //等待时间 39 FP.addVariable("pics", fp_pics); //广告图片地址 40 FP.addVariable("urls", fp_links); //广告链接地址 41 FP.addVariable("def_pic", def_pic); //默认图片地址 42 FP.addVariable("def_link", def_link); //默认链接地址 43 FP.write("ad_headerbanner"); 44 //--> 45 </SCRIPT></div> 46 <br><br> 47 <p><a href="http://keleyi.com/a/bjac/8qx83gls.htm">原文</a> 代码整理:<a href="http://keleyi.com/" target="_blank">柯乐义</a></p> 48 </body> 49 </html>
web前端:http://www.cnblogs.com/jihua/p/webfront.html