下面是include/js/slide.js文件
修改后的slide.js内容如下。
document.write("<style type=\"text/css\">#slidearea { width:" + xsImgSize[0] + "px; height:" + xsImgSize[1] + "px; overflow: hidden; margin: 0 auto; text-align: center;background: #000000; } #slidefooter {width:" + xsImgSize[0] + "px; } </style>")
document.write("<div id=\"slidearea\">")
if (xsImgs.length != 0) {
document.write("<a href=\""+ xsImgLinks[0] +"\" target=\"_blank\"><img src=\"" + xsImgs[0] + "\" onload=\"imgLoadNotify(this," + xsImgSize[0] + "," + xsImgSize[1] +");\" \/><\/a>")
}
document.write("<\/div>")
if (xsTextBar != 0) {
document.write("<div id=\"slidefooter\">")
if (xsPlayBtn != 0) {
document.write("<a id=\"slideplay\" title=\"播放\" href=\""+ xsImgLinks[0] +"\">播放<\/a>")
}
if (xsImgTexts.length != 0) {
document.write("<a id=\"slideprev\" title=\"上一幅\" href=\"#\" onclick=\"rewind();return false\">«<\/a><a id=\"slidenext\" title=\"下一幅\" href=\"#\" onclick=\"forward();return false\" style=\"text-align: center; text-decoration: none;\">»<\/a><p id=\"slidetext\"><a href=\""+ xsImgLinks[0] +"\" target=\"_blank\">"+ xsImgTexts[0] +"<\/a><\/p>")
}
document.write("<\/div>")
}
var arrPreload = new Array();
var begImg = 0;
var arrPreload = new Array();
var spd = 2;
function init()
{
preloadRange(0,_PRELOADRANGE-1);
curImg = begImg;
if (curImg < 0 || curImg > xsImgs.length - 1)
curImg = xsImgs.length - 1;
changeSlide();
setTimeout("play()", 3000)
}
var curImg = 0;
var timerId = -1;
var interval = 3500;
var imgIsLoaded = false;
var current_transition = 15;
var flag = true;
var bFirst = false;
var transitions = new Array;
transitions[0] = "progidXImageTransform.Microsoft.Fade(duration=1)";
transitions[1] = "progidXImageTransform.Microsoft.Blinds(Duration=1,bands=20)";
transitions[2] = "progidXImageTransform.Microsoft.Checkerboard(Duration=1,squaresX=20,squaresY=20)";
transitions[3] = "progid:DXImageTransform.Microsoft.Strips(Duration=1,motion=rightdown)";
transitions[4] = "progid:DXImageTransform.Microsoft.Barn(Duration=1,orientation=vertical)";
transitions[5] = "progid:DXImageTransform.Microsoft.GradientWipe(duration=1)";
transitions[6] = "progid:DXImageTransform.Microsoft.Iris(Duration=1,motion=out)";
transitions[7] = "progid:DXImageTransform.Microsoft.Wheel(Duration=1,spokes=12)";
transitions[8] = "progid:DXImageTransform.Microsoft.Pixelate(maxSquare=10,duration=1)";
transitions[9] = "progid:DXImageTransform.Microsoft.RadialWipe(Duration=1,wipeStyle=clock)";
transitions[10] = "progid:DXImageTransform.Microsoft.RandomBars(Duration=1,orientation=vertical)";
transitions[11] = "progid:DXImageTransform.Microsoft.Slide(Duration=1,slideStyle=push)";
transitions[12] = "progid:DXImageTransform.Microsoft.RandomDissolve(Duration=1,orientation=vertical)";
transitions[13] = "progid:DXImageTransform.Microsoft.Spiral(Duration=1,gridSizeX=40,gridSizeY=40)";
transitions[14] = "progid:DXImageTransform.Microsoft.Stretch(Duration=1,stretchStyle=push)";
transitions[15] = "special case";
var transition_count = 15;
var _PRELOADRANGE = 5;
function preloadRange(intPic,intRange) {
var divStr = "";
for (var i=intPic; i<(intPic+intRange); i++) {
arrPreload = new Image();
arrPreload.src = xsImgs;
}
return false;
}
/*
我不懂js,请问有没有人知道怎么修改这些代码?红色标注部分是不是就是幻灯图片切换的不同效果?想修改一下,官方的默认效果太难看了但是我不知道怎么修改,请教高人指点?如果能用汉字注释一下最好先谢谢了 |