homepage Welcome to WebmasterWorld Guest from 54.161.214.221
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Eyes
Good script for eyes that follow your mouse?
joshie76




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

anybody know of one? Preferably one that can work accross frames though not critical?

 

tedster




msg:601927
 1:25 pm on Sep 27, 2001 (gmt 0)

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>

joshie76




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

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?

Marcia




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

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.

MichaelThomas




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

www.bratta.com

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved