Willdawg
07-19-2005, 01:56 AM
<html>
<head>
<script>
//sorry for sloppy script just testing :)
movecounter = 0;
function move1(){
playerxspeed=8;
playeryspeed=8;
oveTox=event.clientX;
oveToy=100;
you1.style.posLeft +=playerxspeed;
you1.style.posTop +=playeryspeed;
movetimer = setTimeout("move1();",60);
movecounter += 1;
tempc = movecounter*playerxspeed;
if(tempc >= oveTox){
clearTimeout(movetimer);
}
}
</script>
</head>
<body>
<table width="800" height="800">
<tr>
<td onclick="move1()">
<IMG id="you1" SRC="you.bmp" STYLE="position: absolute; z-index:3">
</td>
</tr>
</table>
</body>
</html>
this is my script I think the problem may be in the oveTox variable does it store as a string I dunno I just actually started coding again sorry for stupid question.
<head>
<script>
//sorry for sloppy script just testing :)
movecounter = 0;
function move1(){
playerxspeed=8;
playeryspeed=8;
oveTox=event.clientX;
oveToy=100;
you1.style.posLeft +=playerxspeed;
you1.style.posTop +=playeryspeed;
movetimer = setTimeout("move1();",60);
movecounter += 1;
tempc = movecounter*playerxspeed;
if(tempc >= oveTox){
clearTimeout(movetimer);
}
}
</script>
</head>
<body>
<table width="800" height="800">
<tr>
<td onclick="move1()">
<IMG id="you1" SRC="you.bmp" STYLE="position: absolute; z-index:3">
</td>
</tr>
</table>
</body>
</html>
this is my script I think the problem may be in the oveTox variable does it store as a string I dunno I just actually started coding again sorry for stupid question.