3 Boyutlu Halka Java Script

wolfboy61

New member
Katılım
5 Haz 2009
Mesajlar
49
Reaction score
0
Puanları
0
Konum
Trabzon
Kod:
<!--- KAYNAK: http://www.gezginler.net --->
<script language="JavaScript">
var step=0.4;
var a_StEp=0.1;
var RunTime=0;
var currStep = 0;
var Xpos = 0;
var Ypos = 0;
var cntr=70;

if (********.layers){
********.write('<LAYER NAME="a0" LEFT=0 TOP=0 BGCOLOR=#FF0000 CLIP="0,0,2,2"></LAYER>'
+'<LAYER NAME="a1" LEFT=0 TOP=0 BGCOLOR=#00FF00 CLIP="0,0,2,2"></LAYER>'
+'<LAYER NAME="a2" LEFT=0 TOP=0 BGCOLOR=#3355FF CLIP="0,0,2,2"></LAYER>'
+'<LAYER NAME="a3" LEFT=0 TOP=0 BGCOLOR=#FFF000 CLIP="0,0,2,2"></LAYER>'
+'<LAYER NAME="a4" LEFT=0 TOP=0 BGCOLOR=#FF00FF CLIP="0,0,2,2"></LAYER>'
+'<LAYER NAME="a5" LEFT=0 TOP=0 BGCOLOR=#FFFFFF CLIP="0,0,2,2"></LAYER>'
+'<LAYER NAME="a6" LEFT=0 TOP=0 BGCOLOR=#FFA000 CLIP="0,0,2,2"></LAYER>');
}
else if (********.all){
********.write('<div id="ieDiv" style="position:absolute;top:0px;left:0px">'
+'<div id="c" style="position:relative">'
+'<div style="position:absolute;top:0px;left:0px;width:2px;height:2px;background:#ff0000;font-size:2px"></div>'
+'<div style="position:absolute;top:0px;left:0px;width:2px;height:2px;background:#00ff00;font-size:2px"></div>'
+'<div style="position:absolute;top:0px;left:0px;width:2px;height:2px;background:#ffffff;font-size:2px"></div>'
+'<div style="position:absolute;top:0px;left:0px;width:2px;height:2px;background:#ffa500;font-size:2px"></div>'
+'<div style="position:absolute;top:0px;left:0px;width:2px;height:2px;background:#ff00ff;font-size:2px"></div>'
+'<div style="position:absolute;top:0px;left:0px;width:2px;height:2px;background:#3388ff;font-size:2px"></div>'
+'<div style="position:absolute;top:0px;left:0px;width:2px;height:2px;background:#fff000;font-size:2px"></div>'
+'</div>'
+'</div>');
}
function moveAbout(){
if (********.layers)
{
Ypos = window.pageYOffset+window.innerHeight/2 + window.innerHeight/3 * Math.cos((RunTime)/3)*Math.cos(RunTime/50);
Xpos = window.pageXOffset+window.innerWidth/2 + window.innerWidth/2.4 * Math.sin((RunTime)/5)*Math.cos(RunTime/30);
}
else if (********.all)
 { 
Ypos = ********.body.scrollTop+********.body.offsetHeight/2 + ********.body.offsetHeight/2.8*Math.cos((RunTime)/3)*Math.cos(RunTime/10);
Xpos=  ********.body.scrollLeft+********.body.offsetWidth/2 + ********.body.offsetWidth/2.4*Math.sin((RunTime)/5)*Math.sin(RunTime/20);
 }
RunTime+=a_StEp;
Tma=setTimeout("moveAbout()", 10);
}
function TwistnSpin(){
if (********.layers)
{
 for ( i = 0 ; i < 7 ; i++ )
 {
  var templayer="a"+i
  ********.layers[templayer].top = Ypos+cntr*Math.cos(((currStep+1)+i*4.5)/5)*Math.cos(currStep/10)
  ********.layers[templayer].left =Xpos+cntr*Math.sin(((currStep+1)+i*4.5)/5);
 }
}
else if (********.all)
{
 for (i=0;i<ieDiv.all.c.all.length;i++)
 {
 ieDiv.all.c.all[i].style.top = Ypos+cntr*Math.cos(((currStep+1)+i*4.5)/5)*Math.cos(currStep/10)
 ieDiv.all.c.all[i].style.left= Xpos+cntr*Math.sin(((currStep+1)+i*4.5)/5); 
 }
}
currStep+=step;
setTimeout("TwistnSpin()",10);
}
function Shrink(){
cntr-=0.5;
GoShrink=setTimeout('Shrink()',10);
if (cntr <=20)
{clearTimeout(GoShrink);Swell()}
}
function Swell(){
cntr+=0.5;
GoSwell=setTimeout('Swell()',10);
if (cntr >=70)
{clearTimeout(GoSwell);Shrink()} 
}
function StArTuP(){
moveAbout();
TwistnSpin();
Shrink();
}
StArTuP();
</script>
<!--- KAYNAK: http://www.gezginler.net --->
 
Geri
Üst