使用超强幻灯片播放脚本的方法

使用超强幻灯片播放脚本的方法

<HTML>
<HEAD>
<TITLE>夜雨休闲 - 幻灯片播放</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<LINK HREF="Images/Style.css" REL="stylesheet">
</HEAD>

<SCRIPT language="VBScript">

'***************************************************
'模拟幻灯片播放脚本程序
'夜雨休闲By 2003-11
'***************************************************

DimFileList,FileListArr
FileList="001.jpg,002.jpg,003.jpg,004.jpg,005.jpg,006.jpg,007.jpg,008.jpg,009.jpg,010.jpg"
FileListArr=Split(FileList,",")

DimCanPlay
CanPlay=CInt(Split(Split(navigator.appVersion,";")(1),"")(2))>5

DimFilterStr
FilterStr="RevealTrans(duration=2,transition=23)"
FilterStr=FilterStr+";BlendTrans(duration=2)"

IfCanPlayThen
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.Pixelate(,enabled=false,duration=2,maxSquare=25)"
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0)"
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.GradientWipe(duration=2,gradientSize=0.25,motion=forward)"
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.Stretch(duration=2,stretchStyle=PUSH)"
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.Wheel(duration=2,spokes=16)"
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.RandomDissolve(duration=2)"
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.Spiral(duration=2,gridSizeX=50,gridSizeY=50)"
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.Slide(duration=2,bands=1,slideStyle=SWAP)"
FilterStr=FilterStr+";progid:DXImageTransform.Microsoft.RadialWipe(duration=2,wipeStyle=CLOCK)"
Else
Msgbox"幻灯片播放具有多种动态图片切换效果,但此功能需要您的浏览器为IE5.5或以上版本,否则您将只能看到部分的切换效果。",64
EndIf

DimFilterArr
FilterArr=Split(FilterStr,";")

DimPlayImg_M
PlayImg_M=5*1000'切换时间(毫秒)

DimI
I=1

SubChangeImg
DoWhileFileListArr(I)=""
I=I+1
IfI>UBound(FileListArr)ThenI=0
Loop
DimJ
IfI>UBound(FileListArr)ThenI=0
Randomize
J=Int(Rnd*(UBound(FilterArr)+1))
Img.style.filter=FilterArr(J)
Img.filters(0).Apply
Img.Src=FileListArr(I)
Img.filters(0).play
I=I+1
IfI>UBound(FileListArr)ThenI=0
TempImg.Src=FileListArr(I)

SetTimeout"ChangeImg",PlayImg_M
EndSub
</SCRIPT>

<BODY BGCOLOR="#000000">
<TABLE WIDTH="100%" height="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR ID="NoScript">
<TD Align="Center" Style="Color:White">对不起,图片浏览功能需脚本支持,但您的浏览器已经设置了禁止脚本运行。请您在浏览器设置中调整有关安全选项。</TD>
</TR>
<TR Style="Display:none" ID="CanRunScript">
<TD HEIGHT="100%" Align="Center" vAlign="Center">
<Img ID="Img" Border="0" >
</TD>
</TR>
<TR Style="Display:none">
<TD><Img ID="TempImg" Border="0"></TD>
</TR>

</TABLE>

<Script Language="VBScript">
NoScript.Style.Display = "none"
CanRunScript.Style.Display = ""
Img.Src = FileListArr(0)
SetTimeout "ChangeImg", PlayImg_M
</Script>