发布网友 发布时间:2022-04-26 15:32
共1个回答
热心网友 时间:2022-04-23 14:39
<script type="text/javascript"> // 幻灯片式的网页图片滚动函数(不需要做任何改动) function roll_pic_flash(roll_pic_ary) { var w = roll_pic_ary[3][0]; var h = roll_pic_ary[3][1]; var text_h = roll_pic_ary[3][2]; var bgcolor = roll_pic_ary[3][3]; var roll_swf = roll_pic_ary[3][4]; var swf_height = h + text_h; var pics = roll_pic_ary[0].join("|"); var links = roll_pic_ary[1].join("|"); var texts = roll_pic_ary[2].join("|"); return '<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="'+ w +'" height="'+ swf_height +'"><param name="default_url" value=""><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="' + roll_swf + '"><param name="quality" value="high"><param name="bgcolor" value="'+bgcolor+'"><param name="menu" value="false"><param name="improved_by" value=""><param name=wmode value="opaque"><param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+w+'&borderheight='+h+'&textheight='+text_h+'"><embed src="' + roll_swf + '" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+w+'&borderheight='+h+'&textheight='+text_h+'" menu="false" bgcolor="'+bgcolor+'" quality="high" width="'+ w +'" height="'+ h +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" /></object>'; } // 开始设置幻灯片参数 var roll_pic_width = 478; // 图片宽度 var roll_pic_height = 180; // 图片高度 var roll_text_height = 0; // 文字高度 var roll_bgcolor = '#ffffff'; // 幻灯片背景色 var roll_flash = ' http://www.8cms.cn/ad/roll_pic_new.swf'; // 幻灯片flash地址,请将此flash下载保存到你的服务器,以免失效 // 幻灯片数组roll_pic_ary初始化(不用做任何改动) var roll_pic_ary = new Array(Array(0),Array(0),Array(0), Array(roll_pic_width,roll_pic_height,roll_text_height,roll_bgcolor,roll_flash)); // 增加一个图片,连接,文字说明 roll_pic_ary[0].push(" http://www.hopebuy.com/uploadfile/2010_3/20103191041433804.jpg" ); roll_pic_ary[1].push(escape("#")); roll_pic_ary[2].push("#"); // 增加一个图片,连接,文字说明 roll_pic_ary[0].push(" http://53psp.com/sc/img_shopxp/swf/002.jpg" ); roll_pic_ary[1].push(escape("#")); roll_pic_ary[2].push("#"); // 增加一个图片,连接,文字说明 roll_pic_ary[0].push(" http://www.hopebuy.com/uploadfile/2010_3/201032317015769.jpg" ); roll_pic_ary[1].push(escape("#")); roll_pic_ary[2].push("#"); // 增加一个图片,连接,文字说明 roll_pic_ary[0].push(" http://53psp.com/ch/image/lo1.jpg" ); roll_pic_ary[1].push(escape("#")); roll_pic_ary[2].push("#"); roll_pic_ary[0].push(" http://53psp.com/ch/image/log3.jpg" ); roll_pic_ary[1].push(escape("#")); roll_pic_ary[2].push("#"); // 显示幻灯片式的网页图片滚动 document.write(roll_pic_flash(roll_pic_ary)); </script>