-
АгатаКристи (20.11.08 00:01) [0]Нужна помощь...
Нужно придать переменным S1 и S2 значения координат мыши.
<html>
<head>
<title>Sun system</title>
<script type="text/javascript">
var fi = 0
var EL
var ET
var s1
var s2
function Move()
{
fi+=0.01;
s1=460;
s2=360;
Sun.style.left=s1;
Sun.style.top=s2;
Earth.style.left = 150*Math.cos(fi)+s1+25;
Earth.style.top = 120*Math.sin(fi)+s2+25;
EL = 150*Math.cos(fi)+s1+25;
ET = 120*Math.sin(fi)+s2+25;
Venus.style.left = 100*Math.cos(1.25*fi)+s1+25;
Venus.style.top = 80*Math.sin(1.25*fi)+s2+25;
Mercury.style.left = 70*Math.cos(1.56*fi)+s1+30
Mercury.style.top = 56*Math.sin(1.56*fi)+s2+32;
Mars.style.left = 200*Math.cos(0.75*fi)+s1+30;
Mars.style.top = 160*Math.sin(0.75*fi)+s2+30;
Jupiter.style.left = 250*Math.cos(0.56*fi)+s1+10;
Jupiter.style.top = 200*Math.sin(0.56*fi)+s2+10;
Saturn.style.left = 320*Math.cos(0.42*fi)+s1+15;
Saturn.style.top = 256*Math.sin(0.42*fi)+s2+15;
Uranus.style.left = 360*Math.cos(0.31*fi)+s1+20;
Uranus.style.top = 288*Math.sin(0.31*fi)+s2+20;
Neptune.style.left = 420*Math.cos(0.23*fi)+s1+20;
Neptune.style.top = 336*Math.sin(0.23*fi)+s2+20;
Pluto.style.left = 460*Math.cos(0.17*fi)+s1+20;
Pluto.style.top = 368*Math.sin(0.17*fi)+s2+20;
Moon.style.left = 35*Math.cos(2*fi)+ EL;
Moon.style.top =35*Math.sin(2*fi)+ ET;
}
</script>
</head>
<body onload="Start()" >
<div style="text-align:right; color:blue;">
</div>
<script type="text/javascript">
</script>
</body>
</html>
-
KilkennyCat © (20.11.08 01:00) [1]