这段图片轮换代码谁能处理一下? 20
<script>vari=0,pictures=newArray();//设置图片数组,图片数为奇数varpicbase="";pictures[i++]="images...
<script>
var i=0,pictures=new Array();//设置图片数组,图片数为奇数
var picbase="";
pictures[i++]="images/p1.jpg"
pictures[i++]="images/p2.jpg"
pictures[i++]="images/p3.jpg"
pictures[i++]="images/p4.jpg"
var picturewidth=250//图片宽度
var pictureheight=333//图片高度
var delay=10//延迟时间
</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 = 0.5;//设置渐变度
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(picbase+pictures[2*i])
myArr2[i]=m.ImportImage(picbase+pictures[2*i+1])
}
if(pictures[2*i])
myArr[i]=m.ImportImage(picbase+pictures[2*i])
else
myArr[i]=m.ImportImage(picbase+pictures[0]) ;
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>
该代码运行后,图片下面有一块空白区域不可用,请问哪为高手能清除下面的空白区域啊??急!!!谢谢啦! 展开
var i=0,pictures=new Array();//设置图片数组,图片数为奇数
var picbase="";
pictures[i++]="images/p1.jpg"
pictures[i++]="images/p2.jpg"
pictures[i++]="images/p3.jpg"
pictures[i++]="images/p4.jpg"
var picturewidth=250//图片宽度
var pictureheight=333//图片高度
var delay=10//延迟时间
</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 = 0.5;//设置渐变度
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(picbase+pictures[2*i])
myArr2[i]=m.ImportImage(picbase+pictures[2*i+1])
}
if(pictures[2*i])
myArr[i]=m.ImportImage(picbase+pictures[2*i])
else
myArr[i]=m.ImportImage(picbase+pictures[0]) ;
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>
该代码运行后,图片下面有一块空白区域不可用,请问哪为高手能清除下面的空白区域啊??急!!!谢谢啦! 展开
1个回答
展开全部
var picturewidth=250//图片宽度
var pictureheight=333//图片高度
改变数值就可以了
var pictureheight=333//图片高度
改变数值就可以了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询