Closed Thread Icon

Topic awaiting preservation: Circle Issues- well, not really (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8823" title="Pages that link to Topic awaiting preservation: Circle Issues- well, not really (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Circle Issues- well, not really <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-20-2003 17:29

http://www.twistedport.com/misc/circlepath/circle.html

I wrote this script and wanted to expand it... but I''m getting an error ("Object Required") on these lines:

code:
//mouseX = event.x;
//mousey = event.y;



Seems pretty straight foward to me.... what's up?


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

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 08-20-2003 17:40

event.x refers to the x position of the object that called it (or something similar). therefore, uncommented, when you first move your mouse, the 2 lines will execute and you will have your values, but when the setTimeout() calls it, the event does not have an x position, it is called in the script, hence there is no object to give it x and y values

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

Scott
Bipolar (III) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 08-22-2003 06:48

If you wanted to center it around the mouse, you could use a simple mouse handler function and set some global variables for reference there.


var x,y;

document.onmousemove = mmH;

function mmH(e) {
// set X and Y to mouse coords
x = e.left &#0124; &#0124; event.clientX;
y = e.top &#0124; &#0124; event.clientY;
}

Something to that effect, anyways.

« BackwardsOnwards »

Show Forum Drop Down Menu