代码不全
Interpolate这些函数都是自定义函数
Interpolate这些函数都是自定义函数
解决方案 »
- 在firefox下如何使用ActiveXObject?
- fckeditor里面的LoadLanguageFile函数是怎样被调用的?
- js中用DOM模型,读取或修改多个class属性该怎么写啊??在线等---
- 如何做成一个类似于制定路径用的窗口
- 一个js方法能改变一个div的属性值吧
- 请问大哥,在javascript中怎么能实现向vb中的commondialog的功能,为了采集一个路径
- 设计软件和设计网站就是不一样,这样的问题也要考虑到,急救 !!!
- 这句VB代码该如何用脚本实现?请知无不言。。
- 送分题,急用
- 那位大神会做
- iframe 加载完毕的事件名称是什么?
- 请教在Firefox下代替insertAdjacentElement的方法
var i=0,pictures=new Array();//设置图片数组,图片数为奇数
var picbase="";
pictures[i++]="1.gif"
pictures[i++]="2.gif"
pictures[i++]="3.gif"
pictures[i++]="4.gif"
pictures[i++]="5.gif"
pictures[i++]="6.gif"
pictures[i++]="7.gif"
pictures[i++]="8.gif"
pictures[i++]="9.gif"
pictures[i++]="10.gif"
pictures[i++]="11.gif"
pictures[i++]="12.gif"
pictures[i++]="13.gif"
pictures[i++]="14.gif"
pictures[i++]="15.gif"
pictures[i++]="16.gif"
pictures[i++]="17.gif"
pictures[i++]="18.gif"
pictures[i++]="19.gif"
pictures[i++]="20.gif"
pictures[i++]="21.gif"
pictures[i++]="22.gif"
var picturewidth=400//图片宽度
var pictureheight=290//图片高度
var delay=1//延迟时间
</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(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>使用的技巧区别于以往的主要在将图片交替转为两个数组,利用内部计数Interpolate和NthAnim技术实现动画。