<SCRIPT>
var i=0,pictures=new Array();
pictures[i++]="hopeshow/hopeshow1.jpg"
pictures[i++]="hopeshow/hopeshow2.jpg"
pictures[i++]="hopeshow/hopeshow3.jpg"
pictures[i++]="hopeshow/hopeshow4.jpg"
pictures[i++]="hopeshow/hopeshow5.jpg"
pictures[i++]="hopeshow/hopeshow6.jpg"
pictures[i++]="hopeshow/hopeshow7.jpg" //此处还可继续添加图片
var picturewidth=180 //图片的宽度值
var pictureheight=144 //图片的高度
var delay=3 //图片轮换的速度
</SCRIPT>
<SCRIPT>
if (document.all) {
document.write(<OBJECT ID="DAControl_Wipe" )
document.write(STYLE="width:+picturewidth+;height:+pictureheight+")
document.write(CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">)
document.write(</OBJECT>)
m = DAControl_Wipe.MeterLibrary;
whatTransformation = new ActiveXObject("DXImageTransform.Microsoft.Wipe");
whatTransformation.GradientSize = 1.0;
whatTransformation.WipeStyle = 0;
var myArr=new Array(),myArr2=new Array();
var len=Math.floor(pictures.length/2)
for(var i=0;i<len;i++){
myArr[i]=m.ImportImage(pictures[2*i])
myArr2[i]=m.ImportImage(pictures[2*i+1])
}
myArr[i]=m.ImportImage(pictures[2*i])
myArr=m.Array(myArr)
myArr2=m.Array(myArr2)
Index = m.Interpolate(0.5,len+0.5,len*2*delay).RepeatForever();
Index2 = m.Interpolate(0,len,len*2*delay).RepeatForever();
var whatPictures=new Array();
whatPictures[0] = myArr.NthAnim(Index);
whatPictures[1] = myArr2.NthAnim(Index2);
forward = m.Interpolate(0, 1, delay);
back = m.Interpolate(1, 0, delay);
whatMovement = m.Sequence(forward, back).RepeatForever();
theResult = m.ApplyDXTransform( whatTransformation, whatPictures, whatMovement );
DAControl_Wipe.Image = theResult.OutputBvr;
DAControl_Wipe.Start();
}
</SCRIPT>
至此,图片轮换擦洗特效搞定
更多的图片擦洗特效请到论坛查看: http://BBS.TC711.COM
【 双击滚屏 】 【 评论 】 【 收藏 】 【 打印 】 【 关闭 】
来源:
互联网
日期:2006-6-12