76、图片变形展开效果

76、图片变形展开效果

脚本说明:

把如下代码加入<body>区域中

<script language="javascript">

count = 40

colorAdder = 255/count

scaleSize = 3

var speed = []

var n = 0

for(b=0;b!=count+1;b++){

a = count - b

speed[b] = Math.cos(b/100)

document.write('<OBJECT ID="RDS" CLASSID="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" STYLE="position:absolute;top:0;left:0;width:350;height:350"><PARAM NAME="Line0001" VALUE="SetLineStyle(1)"><PARAM NAME="Line0002" VALUE="SetFillStyle(1)"><PARAM NAME="Line0003" VALUE="SetLineColor('+(b*colorAdder)+','+((b/2)*colorAdder)+','+0+')"><PARAM NAME="Line0004" VALUE="SetFillColor('+(a*colorAdder)+','+((a/2)*colorAdder)+','+0+')"><PARAM NAME="Line0005" VALUE="Rect('+(-(a/2)*(scaleSize/2))+', '+(-(a*2)*(scaleSize/2))+', '+(a*scaleSize)+', '+(a*scaleSize)+', 0)"></OBJECT>')

}

function DoStuff(){

n+=0.01

var tempval2 = speed.slice(1,speed.length)

speed = tempval2.concat([Math.cos(n)*50])

 

for(a=0;a!=count+1;a++){

RDS[a].Rotate(0,0,speed[a]/2)

}

}

setInterval("DoStuff()",10)

</script>

 

Write a comment

Comments: 0