Topic: *Sneaks into room* (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=13833" title="Pages that link to Topic: *Sneaks into room* (Page 1 of 1)" rel="nofollow" >Topic: *Sneaks into room* <span class="small">(Page 1 of 1)</span>\

 
Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 08-15-2002 22:09

Sorry, If I don't post this here, I'l lose it...

<HTML><!-- Thread on Javascript: http://www.ozoneasylum.com/Forum2/HTML/001712.html -->
<HEAD>
<TITLE>Acceleration-Deceleration (08.14.02)</TITLE>
<STYLE type="text/css">
BODY{background-color:#000000;color:#FC6203;}
H1{color:#FF8800;font-size:18px;}
input {margin: 2px;background-color:#999999;color:#FFFFFF}
form {position:absolute;top:3;left:400}
.floatie{font-size:24px;color:#3366FF;}
#castle{position:absolute;font-size:35px;color:#3366FF;top:100;left:150;}

</STYLE>
<SCRIPT language="Javascript">

//Code by Voodoo 'Doll' Petskull
//petskull@nospam.twistedport.com
//http://www.twistedport.com

var newLeft = 0;
var newTop = 0;

var lastLeft = 0;
var lastTop = 0;

function mousetrack(){ //Print out where the mouse is-
daForm.mousetracker2000left.value = event.clientX;
daForm.mousetracker2000top.value = event.clientY;
}

function moveThing(){ //Move the layer 'castle'--
// make all the *old* click vars old and all the *new* click vars new
// and input it in the status bar
lastLeft = newLeft;
lastTop = newTop;

newLeft = event.clientX;
newTop = event.clientY;

window.status= "New Location-- Left: "+newLeft+", Top: "+newTop+" Old Location-- Left: "+lastLeft+", Top: "+lastTop;

// -----------------------------------------/
// Now figure out the distance between the two- for left and for right.....

var disLeft = lastLeft - newLeft;
var disTop = lastTop - newTop;
window.status= "New Location-- Left: "+newLeft+", Top: "+newTop+" Old Location-- Left: "+lastLeft+", Top: "+lastTop+"-- Distance Between: Left: "+disLeft+", Top: "+disTop;

//------------------------------------------/

accdec(lastLeft,lastTop);

}

function accdec(amtleft,amttop){ //Accelerate-Decelerate depending on proximity--


castle.style.left = amtleft;
castle.style.top = amttop;

return(this);
}

</SCRIPT>
</HEAD>
<BODY ONMOUSEMOVE="mousetrack();" ONMOUSEDOWN="moveThing();">

<H1>Hello, World!</H1>
In this daring episode, I will try to make objects move in nifty ways.<BR>
For example, acceleration & deceleration.

<FORM ID="daForm">
<INPUT name="mousetracker2000left" type="text" READONLY="yes" VALUE="left nuthin'...">
<INPUT name="mousetracker2000top" type="text" READONLY="yes" VALUE="top nuthin'..."><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LEFT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TOP
</FORM>

<DIV ID="castle">
<TABLE CLASS="floatie" bgcolor=#3366FF width=30 height=30 border=0 cellpadding=0 cellspacing=1>
<TR><TD bgcolor=#000000 cellspacing=1 cellpadding=0 align=center valign=middle>¤</TD></TR>
</TABLE>
</DIV>

</BODY>
</HTML>




Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 08-15-2002 22:11

btw,
The hidden forums are as follows...

7 Unregistered/Unmoderated
9 Unfounded rumours!
16 Distributed Ward


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

{edit} hey! here's something I wrote a long-ass time ago.. http://www.geocities.com/petskull/forum.html

[This message has been edited by Petskull (edited 08-20-2002).]



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu