Welcome to WebmasterWorld Guest from 50.16.78.128

Forum Moderators: incrediBILL

Message Too Old, No Replies

Eyes

Good script for eyes that follow your mouse?

   
10:35 am on Sep 27, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



anybody know of one? Preferably one that can work accross frames though not critical?
1:25 pm on Sep 27, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Here's some code that I think works across frames. I haven't used it since version 6 browsers came out, so I'm not sure about compatibility there.

<img src="shadow.gif" name="shadow"
style="position: absolute; top:0%; left: 0%">

<script language="JavaScript">
if (document.layers)
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = moveShadow;

function moveShadow() {
getMouse();
if (document.layers)
document.images.shadow.moveTo(gMouseX,gMouseY)
else
document.images.shadow.style.left = gMouseX;
document.images.shadow.style.top = gMouseY;
}
function getMouse(evt) {
if (document.layers) {
gMouseX = evt.pageX;
gMouseY = evt.pageY;
}
else {
gMouseX = event.clientX + document.body.scrollLeft
gMouseY = event.clientY + document.body.scrollTop;
}
}

</script>

1:54 pm on Sep 28, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Tedster.

Unfortunately this one doesn't seem to work across frames - the mousemove event is sensed from the document which is explicitly tied to a single window (frame).

Thanks again though.

I heard that IE5.5 can have layers outside of the browser window - i.e. on the desktop. Has anyone seen this yet?

3:12 am on Oct 5, 2001 (gmt 0)

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member



joshie76, Dynamic HTML has excellent compatibility with IE as a rule. I've seen a nice trailing cursor script at dynamicdrive.com

I believe there's a way to use whichever graphic you like with those scripts. I can't imagine how it would travel across frames; I've never seen it done. Let us know if you find one that works that way for you.

12:13 pm on Oct 15, 2001 (gmt 0)



www.bratta.com