코드를 읽어보니 배열시뮬레이션을 사용하는 것이 좀 딱딱한 것 같아서 직접 다시 작성해 보았는데, 꼭 와주세요
]<script>
var r=200,dv=0.01,w=100,x=400;y=100,pn=8
var pi=3.1415926575,d=pi/2;
var pd=Math.asin(w/2/r);ed=pi*2/pn;smove=true
function window.onload(){
var o=document.getElementById("imground");
var arrimg=o.getElementsByTagName("img");
for (n=0;n<arrimg.length;n++){
arrimg[n].onmouseout=function(){smove=true;}
arrimg[n].onmouseover=function(){smove=false;}
arrimg[n].onmousedown=function(){dv=dv*2}
}
setInterval(roundMove,20);
}
function roundMove(){
for (n=1;n<=8;n++){
var o=document.getElementById("p"+n)
var ta=Math.sin(d+ed*n);
var strFilter;
if (ta<0) o.style.left=Math.cos(d+ed*n-pd)*r+x;
else o.style.left=Math.cos(d+ed*n+pd)*r+x;
o.style.top=ta*10+10+y;
o.style.width=Math.abs(Math.cos(d+ed*n+pd)-Math.cos(d+ed*n-pd))*r;
o.style.zIndex=ta*10;
if (o.style.zIndex<0) strFilter="FlipH(enabled:true)"
else strFilter="FlipH(enabled:false)";
if (ta<0) ta=(ta+1)*80+20; else ta=100;
strFilter=strFilter+" alpha(opacity="+ta+")";
o.style.opacity=ta/100;
o.style.filter=strFilter;
}
if (smove) d=d+dv;
}
</script>