关于Blog中加入flash金鱼的补充.
2004-08-27 15:29
453 查看
目前看朋友们在网页上加入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>
<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>
相关文章推荐
- 在blog中加入flash、天气预报,以及养金鱼。
- flex与socket通信之成功----之成功补充篇(关于C#建立FLASH服务端的安全沙箱问题)
- 关于在CSDN Blog公告栏加入Google搜索功能的问题
- 关于在CSDN Blog公告栏加入Google搜索功能的问题
- 网赚关于个人blog加入 Google Adsense广告 注册指南
- [android]第一篇blog 关于android中加入外界的db文件进行数据库访问
- blog的金鱼flash的背景
- 关于“验证码的制作”的一些补充
- 关于select() 的补充啊!
- 关于这个blog使用的问题?
- 关于博文“PGRouting初探”的一点补充
- 关于caffe学习系列的一点补充——如何将float类型的特征数据存入lmdb
- 关于飞机射击类游戏的设计原理 (加入时间:2001-3-4)
- C++关于迭代器删除(erase)插入(insert)失效问题http://m.blog.csdn.net/blog/a327369238/26715187
- 关于海量分页的补充说明(转)
- 使用C++实现SDK之WebBrowser容器 系列的一个补充. 关于GetHtmlDocumentX()
- 在基于Struts构架的Java Web项目中加入ICTCLAS分词http://blog.csdn.net/CloneIQ/archive/2006/08/09/1043088.aspx
- 关于flash跨域数据加载
- window下的tomcat手册之五【关于tomcat版本和windwo服务的补充和道歉】
- 关于STM32 FLASH上运行ecos的内存配置的一点解释