Thread View: de.comp.lang.javascript
1 messages
1 total messages
Started by dj vishnu
Thu, 06 Nov 2003 16:16
Scritp for moving a box over the screen
Author: dj vishnu
Date: Thu, 06 Nov 2003 16:16
Date: Thu, 06 Nov 2003 16:16
61 lines
3214 bytes
3214 bytes
This is a multi-part message in MIME format.
------=_NextPart_000_004B_01C3A489.C4DBA670
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
im only moving it in y direction, and i want to animate it, but
the setTimeout() doesnt seem to have any effect, i can change the
value and it still runs super fast (it gets to there in a millisecond)
any thoughts why?
var menuPos =3D 584;
var slutt =3D 565;
function initMove(){
if(!(menuPos=3D=3Dslutt)){
menuPos =3D menuPos -1;
document.getElementById('test').style.top =3D menuPos;
setTimeout(initMove(),5000);
}
}
------=_NextPart_000_004B_01C3A489.C4DBA670
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>im only moving it in y direction, and i =
want to=20
animate it, but</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the setTimeout() doesnt seem to have =
any effect, i=20
can change the</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>value and it still runs super fast (it =
gets to=20
there in a millisecond)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>any thoughts why?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>
<DIV><FONT face=3DVerdana size=3D2><STRONG>var menuPos =3D 584;<BR>var =
slutt =3D=20
565;</STRONG></FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2><STRONG>function=20
initMove(){<BR> if(!(menuPos=3D=3Dslutt)){<BR> menuPos =3D =
menuPos=20
-1;<BR> document.getElementById('test').style.top =3D=20
menuPos;<BR> setTimeout(initMove(),5000);<BR> }<BR>}</STRONG></=
FONT></DIV></DIV></BODY></HTML>
------=_NextPart_000_004B_01C3A489.C4DBA670--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads