...

View Full Version : layer follows mouse



Shecky
01-10-2003, 03:28 AM
can somone tell me how to make a layer that is always under the mouse pointer?

If anyone has any ideas about how to make that layer always on top of all the other layers, that would be helpful, too.

I BELIEVE by using this method i can fix the problem i'm having with the drag function crapping out when my mouse moves over another iframe in this script (http://technosquid.com/drag/drag.html)

chrismiceli
01-10-2003, 02:35 PM
i am not sure, try this


<style>
.class { position: relative; cursor:pointer
}
</style>
<layer id="class">

Shecky
01-10-2003, 05:33 PM
I appreciate the effort but even i could tell that wasnt gunna work! heh I think you might have misunderstood me. I want a layer that is always under the mouse pointer.. i've seen about the same effect in mouse trail effect scripts, unfortunately i'm slightly too stupid to see how they work exactly. The code i'm looking for i'm positive is full of a buncha annoying document.onmousemove ****.

jkd
01-10-2003, 06:30 PM
Ummm:

<style type="text/css">
#mouse {
position: absolute;
left: 0;
top: 0;
}
</style>

Then:

document.onmousemove = function(evt) {
var el = (document.getElementById || document.all)('mouse');
el.style.left = window.event ? event.x : evt.clientX;
el.style.top = window.event ? event.y : evt.clientY;
}

And:

<div id="mouse">something</div>

Or something like that, I didn't test it or anything.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum