Closed Thread Icon

Preserved Topic: Big time Newbie. Question on MouseCursor Follows. Pages that link to <a href="https://ozoneasylum.com/backlink?for=17843" title="Pages that link to Preserved Topic: Big time Newbie. Question on MouseCursor Follows." rel="nofollow" >Preserved Topic: Big time Newbie. Question on MouseCursor Follows.\

 
Author Thread
Shifter
Bipolar (III) Inmate

From: Mesquite, TX 75149
Insane since: Aug 2000

posted posted 08-10-2000 07:47

I know this question has been addressed several times..but they have always been for people who have some knowledge of java. I have just about NONE! Heh. I would like to put on a page I am working on where an image follows the cursor but I need specific instructions on how to do this.

Any help would be appreciated..thanks.

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 08-15-2000 11:23

Hey! That's great! Now...how about telling us what it is you want to know? We aren't psychic.




What's mine is mine, and what's yours is mine to - First Rule of a Dictatorship

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 08-15-2000 18:44

Try reading the topic I posted in this forum called "Following the Cursor." I know very little if anything of JavaScript (not Java, BTW, big difference) and was able to put together a pretty cool page with these guys' help.


Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 08-26-2000 16:17

Whoopss...sorry about that last post. I didn't read your original post properly and I had had a bad day, so I was feeling bitchy.




Don't make me come down there! - God

Petskull
Maniac (V) Mad Scientist

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

posted posted 09-01-2000 16:59

I feel your pain, shifter. I'm a total beginner at all this stuff. Sure I'm alright with "old-style" HTML, but the new stuff with DHTML and Javascript has me running like ketchup on a cold day. Best of luck to you. Keep trying and don't stess.



tskull@techie.com">

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 09-01-2000 19:50

here are the basics.
<script language="javascript">
// browser detect
ie = (document.all) ? 1:0;
nn = (document.layers) ? 1:0;

// variables to deal with browser compatibility issues
if (ie){
docObj = 'document.all.'
styleObj = '.style'}
if (nn) {
docObj = 'document.'
styleObj = ''}

// Event (mousemove) capturing;
if (ie) { document.onmousemove = mover; }
if (nn) {window.captureEvents(Event.MOUSEMOVE); window.onMouseMove = mover;}

// function to use when the mouse moves
function mover(e){
// get the mouse coords I added 10 to pull the DIV a little off of the mouse
x = (ie) ? (event.x + 10) e.pageX + 10);
y = (ie) ? (event.y + 10) e.pageY + 10);
// make the Div follow the mouse
eval(docObj + 'testDIV' + styleObj + '.left = ' + x);
eval(docObj + 'testDIV' + styleObj + '.top = ' + y);
}
</script>
<!-- Style Info Notice the name of the DIV is the same as the name in the move function-->
<style type="text/css">
#testDIV {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-
</style>
then drop the DIV you want into your body.
Something like this.

<div id="testDIV">
this is a test
</div>


hope it helps

whoops got some slimies by accident must disable...

Walking the Earth like Kane

[This message has been edited by bitdamaged (edited 01-09-2000).]

« BackwardsOnwards »

Show Forum Drop Down Menu