对联随滚动条滚动效果

来源:互联网 发布:java访问oracle数据库 编辑:程序博客网 时间:2024/04/30 12:32
//复制到BODY下面,然后更改相关链接//
<SPAN id=showCoupletLeft style="LEFT: 5px; POSITION:absolute; TOP: 518px">
<OBJECT>
<PARAM NAME="_cx" VALUE="2646">
<PARAM NAME="_cy" VALUE="7938">
<PARAM NAME="FlashVars"VALUE="">
<PARAM NAME="Movie"VALUE="左边FLASH路径">
<PARAM NAME="Src"VALUE="左边FLASH路径">
<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="">
<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">
<PARAM NAME="Profile"VALUE="0">
<PARAM NAME="ProfileAddress"VALUE="">
<PARAM NAME="ProfilePort"VALUE="0">        
<embed src="左边FLASH路径" quality="high"pluginspage="http://www.macromedia.com/go/getflashplayer"type="application/x-shockwave-flash" width="100"height="300"></embed>
</OBJECT>
</SPAN>
<SPAN id=showCoupletRight style="RIGHT: 5px;POSITION: absolute; TOP: 518px">
<OBJECT>
<PARAM NAME="_cx" VALUE="2646">
<PARAM NAME="_cy" VALUE="7938">
<PARAM NAME="FlashVars"VALUE="">
<PARAM NAME="Movie"VALUE="右边FLASH路径">
<PARAM NAME="Src"VALUE="右边FLASH路径">
<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="">
<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">
<PARAM NAME="Profile"VALUE="0">
<PARAM NAME="ProfileAddress"VALUE="">
<PARAM NAME="ProfilePort"VALUE="0">
<embed src="右边FLASH路径" quality="high"pluginspage="http://www.macromedia.com/go/getflashplayer"type="application/x-shockwave-flash" width="100"height="300"></embed>
</OBJECT>
</SPAN>
<SCRIPT type=text/javascript>
function closead()
{
document.getElementByIdx("showCoupletLeft").style.visibility='hidden';
document.getElementByIdx("showCoupletRight").style.visibility='hidden';
}
function MoveCouplet(LName,RName) {
if(screen.width<1000||!document.all){
document.getElementByIdx(LName).style.display = 'none';
document.getElementByIdx(RName).style.display = 'none';
} else{
document.getElementByIdx(LName).style.posTop = -200;
document.getElementByIdx(LName).style.position = 'absolute';
document.getElementByIdx(RName).style.posTop = -200;
document.getElementByIdx(RName).style.position = 'absolute';
MoveCoupletLeft(LName);
MoveCoupletRight(RName);
}
}
function MoveCoupletLeft(LName) {
var x = 5;
var y = 10;
var diff =(document.documentElement.scrollTop   + y - document.getElementByIdx(LName).style.posTop)*0.4;
var y = document.documentElement.scrollTop + y - diff;
document.getElementByIdx(LName).style.posTop = y;
document.getElementByIdx(LName).style.posLeft = x;
LeftName=LName;
setTimeout("MoveCoupletLeft(LeftName);", 1);
}
function MoveCoupletRight(RName) {
var x = 5;
var y = 10;
var diff =(document.documentElement.scrollTop   + y - document.getElementByIdx(RName).style.posTop)*0.4;
var y = document.documentElement.scrollTop + y - diff;
document.getElementByIdx(RName).style.posTop = y;
document.getElementByIdx(RName).style.posRight = x;
RightName=RName;
setTimeout("MoveCoupletRight(RightName);", 20);
}
MoveCouplet("showCoupletLeft","showCoupletRight")
</SCRIPT>