|
|
Home » DHTML » Article
Simple Mouse Trail using VB Script
|
| Article by: | Jeff Anderson ( 1362 ) (2/10/2003) |
|
| Sponsored by: | FindMyHosting - Web Hosting Search |
| Summary: | With IE gaining in prominence every day, it's becoming acceptable to use VBScript in web pages. That makes some activities like the mouse trail a real cinch. |
|
| Viewed: 35948 times |
Rating (30 votes): |
|
4.2 out of 5 |
|
|
|
Simple Mouse Trail using VB Script
Whatever you want, even
images:
Following the cursor is really very easy in VB script. Simply set up a span tag with an id of, say 'my_stuff' then use the built in IE subroutine document_onMouseMove to set the absolute position of the span. You can adjust the amount to get it just where you want in relation to the cursor. What could be easier?
As an adjunct to this, if you move the cursor around on this page you will see that the trailing text attempts to adjust itself to fit - try pushing it up against the right margin for example.
One final word of warning, if your page scrolls down (as this one does) you will lose the mouse trail. To keep it we would need to take account of the document.body.scrollTop position - but that's for another time.
For now, enjoy the simplicity of this little script.
|
|
View highlighted Comments
User Comments on 'Simple Mouse Trail using VB Script'
|
Posted by :
Archive Import (Laurence) at 14:39 on Sunday, February 23, 2003
|
Great. I have been looking for a simple code for hours now. I found some fancy stuff with incredible trailers ... but there was no way to get a very simple code for a dynamic effect to combine with an onmouse event of my making. Thank you.
| |
Posted by :
Archive Import (Anifalaje Adetunji) at 05:35 on Monday, February 24, 2003
|
this is what i have been looking for. it is very nice.
please can you please help me to do a mouse trail effect for my webpage?
please just use it and mail me but using my email address and let the trail effect be
" WELCOME TO ANIFALAJE ADETUNJI"S WEBSITE"
thanks
| |
|
|
Posted by :
Archive Import (Herb Aurand) at 09:57 on Friday, May 09, 2003
|
This is very good but I do have one question. How do I put this into my web site and only have it on the "home" page. Also can I ad text to it. Please help.
| |
|
|
|
|
|
|
Posted by :
Archive Import (can't say) at 03:22 on Wednesday, September 10, 2003
|
Well.. You know I wanted o know wether you ever got ones that changed the mouse to a picture of say.. a cat and it stayed like that..??? anyway... just wondering.. thanks
| |
|
To post comments you need to become a member. If you are already a member, please log in .
| RELATED ARTICLES |
Simple Thumbnail Browsing Solution by Troy Wolf
This simple script allows the user to select from several thumbnail images and view the larger image, using a mixture of DHTML and Cascading style sheets. |
 |
Creating CSS Buttons by Thomas D. Greer
With Cascading Style Sheets, you can turn ordinary hyperlinks into fully functional "buttons", without using JavaScript. |
 |
DHTML Horizontal Scroller by Premshree Pillai
Scroll text horizontally when the user hovers over a link. |
 |
DHTML Javascript Ticker by Premshree Pillai
This is a JavaScript Ticker which ticks a number of messages like the one shown above. It also has a useful 'Show All' feature. |
 |
Manipulate Scrollbar Colors Using CSS and JavaScript by Mike Thompson
The thing about the default color of scrollbars is that it's dull and ugly -- usually this color is gray. Wouldn't it be nice to change this color to better fit the overall theme of your site? Luckily, Cascading Style Sheets and JavaScript can be used to do just that!
|
 |
DHTML Scrolling Image by Premshree Pillai
Using this script the user can scroll an image left or right by clicking a buttong
|
 |
DHTML News Bar by Premshree Pillai
This is the News Bar script which displays a number of messages and rotates them using DHTML. |
 |
DHTML Zoom In and Out Script by Premshree Pillai
Using zoOom, you can zoom in and zoom out any image that is specified in the code.
|
 |
DHTML Image Zoom Out by Premshree Pillai
Click on the image and it zooms out and disappears. This script could be a way to handle advertising or other images. |
 |
Simple Mouse Trail using VB Script by Jeff Anderson
With IE gaining in prominence every day, it's becoming acceptable to use VBScript in web pages. That makes some activities like the mouse trail a real cinch. |
 |
| |