[Javascript] Image follows mouse

SkyScanner skyscanner at eircom.net
Sun Sep 4 03:42:20 CDT 2005


Thanks for the ideas, Troy, but I couldn't get that to work in Mozilla/Firefox. In Internet Explorer it works fine, though.

No, I didn't make the pointer invisible - I just needed it to follow nearby.

Greetings to Pristina - its nice to meet you!

Tim in Co.Sligo, in the North West of Ireland.

  ----- Original Message ----- 
  From: Troy III Ajnej 
  To: javascript at LaTech.edu 
  Sent: Sunday, September 04, 2005 3:49 AM
  Subject: Re: [Javascript] Image follows mouse


  Reposting: (Correcting yet another mistake of mine)

  Thanks anyway, I believe that the script will surely work now,
  but you have to tell me,
  how did you manage to make the mouse pointer get invisible,
  because I'm almost sure that this is why you need this kind of 
  script in the first place?!

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  <HTML>
  <BODY>
  <img src='mypointer.gif' ID="myImage" 
  style="position:absolute;top:0px;left:-500px">
  </img>
  </BODY>
  <SCRIPT>
  //version 1.0 -Troy III- progresive art enterprise
  h = myImage.height/2, w = myImage.width/2;
  function mousefollower(){
             x=event.x
             y=event.y
      myImage.style.posLeft= x-h
      myImage.style.posTop = y-w }
  document.onmousemove=mousefollower
  </SCRIPT>
  </HTML>
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  (the corrected [!and tested!] version)

  [It can't get shorter than this!]

  >Thanks very much for that, Troy - I'll work through it.

  No need for it now.

  >Where are you from ? I often wonder where everyone on the list is 
  >from.

  I don't that much, but I like the fact that you do.
  I'm from Pristina, Ancient Dardania, today a small piece of it: 
  Kosova.

  My best regards to you
  >Tim in Ireland.




------------------------------------------------------------------------------
  Find e-mail and documents on your PC instantly with the new MSN Search Toolbar-FREE! 


------------------------------------------------------------------------------


  _______________________________________________
  Javascript mailing list
  Javascript at LaTech.edu
  https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050904/7e83f866/attachment.htm>


More information about the Javascript mailing list