(A Javascript where Gold Letters follow the Mouse)

The effect of this javascript should become apparant as you roll your mouse around this page

I don't take credit for any of the complexities regarding this javascript, but it's one that I am proud of as I worked out how to adapt one that I previously downloaded to suit an idea that I had. For the experts, it will no doubt look a doddle, but for me it was an achievement.

It started as a simple set of stars that followed the mouse around the screen, then I wondered if it was possible to replace the stars with letters.

I picked up some lovely gold lettering somewhere on my travels, I honestly don't know where, else I would give them a mention. Anyway, these letters were large and I reduced the size of them to approximately the same size as the stars. After resizing and renaming each gif, I replaced the file name for the star with the letters I required to form a chain of letters

If you want to replicate this script the way I have done it, you will need to copy or download the letters I have set out below, but there is nothing stopping you from using other letter types or even other images!

For this script, you will need to

1. Download the letter files.

2. Download or copy the script

3. Adapt the script to suit your own needs

4. Copy the adapted code into your webpage

1. Downloading the Letter files

You can either copy each letter or symbol individually by right clicking and "SAVE AS", or alternatively you can click here for the whole lot

2. Download or copy the script

You can copy the script by either downloading it, or by right clicking on this page and selecting VIEW SOURCE. If you choose to download the script, just open it and copy it into the head section of the page, if you choose the view source method, just copy from <SCRIPT> to< /SCRIPT >and paste it into the head section.

Click here to download the script - this is a zip file

3. Adapting the script

All you need to do to adapt this script is to insert the file names for the letters you require after the T1=new Array part of the code.

T1=new Array

Note that every file must be the exact file name, (case sensitive),each file name must be preceded by a ", and followed by ", each file must have width and height dimensions.( you can leave the dimensions as 10,10), and the whole array must begin with ( and end in )

My file naming convention leaves alot to be desired, so feel free to rename the files, but for your benefit, my convention here was letter of the alphabet followed by s (for small!!) You should see that the chain of letters in this script forms the words FOLLOW.THE.MOUSE

4. Copying the script to your webpage

The script will need to be inserted in the <HEAD> section of your webpage (before the </HEAD>). If your'e unsure of where, just look at where I have put it on this page (right click - view source)

Well I hope that makes sense - to see how I used it go to this page

Thanks for being visitor number to this page - I hope this helps you!

Back to my homepage

To my Mirc/Pirch Sounds Page