关于Blog中加入flash金鱼的补充.

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

目前看朋友们在网页上加入flash金鱼的方法,我加了后感觉很漂亮。但发现,如果拉动IE滚动条的话,DIV只能停在指定的位置,所以写了个js来保持永远在页面中间。将下列代码放入->选项->静态新闻组就OK了!

<DIV id=Layer1 style="Z-INDEX: 1; LEFT: 300px; WIDTH: 450px; POSITION: absolute; TOP: 25px; HEIGHT: 350px">

<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 height=400 width=400 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="_cx" VALUE="10583"><PARAM NAME="_cy" VALUE="10583"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Movie" VALUE="http://www.hrtsea.com/bbs/Images/fish.swf"http://www.hrtsea.com/bbs/Images/fish.swf"http://www.hrtsea.com/bbs/Images/fish.swf"http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM NAME="Src" VALUE="http://www.hrtsea.com/bbs/Images/fish.swf"http://www.hrtsea.com/bbs/Images/fish.swf"http://www.hrtsea.com/bbs/Images/fish.swf"http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM">http://www.hrtsea.com/bbs/Images/fish.swf"><PARAM NAME="WMode" VALUE="Transparent"><PARAM NAME="Play" VALUE="0"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="0"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE=""><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1">

<embed src="http://www.hrtsea.com/bbs/Images/fish.swf" width="400" height="400" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" wmode="transparent"></embed></OBJECT></DIV>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

lastScrollY=0;

function SuperCenter(){

diffY=document.body.scrollTop;

percent=.1*(diffY-lastScrollY);

if(percent>0)percent=Math.ceil(percent);

else percent=Math.floor(percent);

document.all.Layer1.style.pixelTop+=percent;

lastScrollY=lastScrollY+percent;

}

window.setInterval("SuperCenter()",1);

// End -->

</script>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航