1   1  /  1  页   跳转

网页交互图片JS代码

网页交互图片JS代码

<a target=_self href="javascript:goUrl()">
<span class="f14b">
<script type="text/javascript">
imgUrl1="img/news/1.jpg"; /**图片路径**/
imgtext1="1" /**图片标题**/
imgLink1=escape("http://"); /**图片链接**/
imgUrl2="img/news/2.jpg";
imgtext2="2"
imgLink2=escape("http://n");
imgUrl3="img/news/3.jpg";
imgtext3="3"
imgLink3=escape("http://");
imgUrl4="img/news/4.jpg";
imgtext4="4"
imgLink4=escape("http://");
imgUrl5="img/news/5.jpg";
imgtext5="5"
imgLink5=escape("http://");

var focus_width=280 /**flash宽度**/
var focus_height=158 /**图片高度**/
var text_height=18 /**标题高度**/
var swf_height = focus_height+text_height
var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5
var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5
var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5
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="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" 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>
</span></a><span id=focustext class=f14b> </span>

效果图片:


用户系统信息:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; KuGooSoft; .NET CLR 1.1.4322)
分享到:
gototop
 

回复: 网页交互图片JS代码

然后把下面这翻页效果的FLASH放到同一目录下就OK了~

附件附件:

文件名:pixviewer.swf
下载次数:237
文件类型:application/x-shockwave-flash
文件大小:
上传时间:2008-5-10 21:15:20
描述:swf

最后编辑我是单眼皮 最后编辑于 2008-05-10 21:20:05
gototop
 
1   1  /  1  页   跳转
页面顶部
Powered by Discuz!NT