※ 水紋特效 ※
   加入網頁步驟  
 
  1. 下載本檔 241.zip

  2. 將此壓縮檔用 winzip6.2 以上版本解開(用 winzip6.2 才不會出現長檔名不完全的情形),解壓縮到您放網頁的目錄中。(假設您網頁放在www目錄中,就將此壓縮檔解到www目錄中)

  3. 將以下的控制碼先複製起來。(用滑鼠將底下的一堆碼,標記起來,按滑鼠右鍵選擇【複製】就行啦!)

  4. 然後在網頁中的 <BODY> 之後將剛剛複製的東西貼上就大功告成了  !(按滑鼠右鍵選擇【貼上】就行啦!)

Copyright Power Information All Rights Reserved.

※水紋特效展示區※


<SCRIPT language="Javascript1.2">
var isNS = (navigator.appName == "Netscape");
layerRef = (isNS) ? "document" : "document.all";
styleRef = (isNS) ? "" : ".style";
var queue = new Array();
var NUM_OF_TRAIL_PARTS = 5

for (x=1; x < 6; x++) {
eval("trailSpriteFrame" + x + " = new Image(28,36);");
eval("trailSpriteFrame" + x + ".src = 'sled2" + x + ".gif';");
}

function trailSpriteObj(anID) {
this.trailSpriteID = "trailSprite" + anID;
this.imgRef = "trailSprite" + anID + "img";
this.currentFrame = 1;
this.animateTrailSprite = animateTrailSprite;
}

function animateTrailSprite() {
if (this.currentFrame <6 ) {
if (isNS) {
eval("document." + this.trailSpriteID +".document['"+ this.imgRef + "'].src = trailSpriteFrame" + this.currentFrame + ".src");
} else {
eval("document['" + this.imgRef + "'].src = trailSpriteFrame" + this.currentFrame + ".src");
}
this.currentFrame ++;
} else {
eval(layerRef + '.' + this.trailSpriteID + styleRef + '.visibility = "hidden"');

}

function processAnim() {
for(x=0; x < NUM_OF_TRAIL_PARTS; x++)
queue[x].animateTrailSprite();
}

function processMouse(e) {
currentObj = shuffleQueue();
if (isNS) {
eval("document." + currentObj + ".left = e.pageX - 10 ;");
eval("document." + currentObj + ".top = e.pageY + 10;");
} else {
eval("document.all." + currentObj + ".style.pixelLeft = event.clientX + document.body.scrollLeft - 10 ;");
eval("document.all." + currentObj + ".style.pixelTop = event.clientY + document.body.scrollTop + 10;");
}
}

function shuffleQueue() {
lastItemPos = queue.length - 1;
lastItem = queue[lastItemPos];
for (i = lastItemPos; i>0; i--) queue[i] = queue[i-1];
queue[0] = lastItem;
queue[0].currentFrame = 1;
eval(layerRef + '.' + queue[0].trailSpriteID + styleRef + '.visibility = "visible"'); 
return queue[0].trailSpriteID;
}

function init() {
for(x=0; x<NUM_OF_TRAIL_PARTS; x++)
queue[x] = new trailSpriteObj(x+1) ;
if (isNS) { document.captureEvents(Event.MOUSEMOVE); }
document.onmousemove = processMouse;
setInterval("processAnim();",5);
}

window.onload = init;

</SCRIPT>

<DIV id="trailSprite1" style="position: absolute; height:28px; width:36px;z-index: 100">
<img src="blanktrail.gif" height=28 width=36 border=0 name="trailSprite1img">
</DIV>
<DIV id="trailSprite2" style="position: absolute; height:28px; width:26px;z-index: 10">
<img src="blanktrail.gif" height=28 width=36 border=0 name="trailSprite2img">
</DIV>
<DIV id="trailSprite3" style="position: absolute; height:28px; width:36px;z-index: 10">
<img src="blanktrail.gif" height=28 width=36 border=0 name="trailSprite3img">
</DIV>
<DIV id="trailSprite4" style="position: absolute; height:28px; width:36px;z-index: 10">
<img src="blanktrail.gif" height=28 width=36 border=0 name="trailSprite4img">
</DIV>
<DIV id="trailSprite5" style="position: absolute; height:28px; width:36px;z-index: 10">
<img src="blanktrail.gif" height=28 width=36 border=0 name="trailSprite5img">
</DIV>