JavaScript implementation of the classic Xeyes program
If you like this animated image and want to include it in your web page do this:
See also our Christmass special image. |
1. Register and download the files
Before downloading the program you are requested to register yourself. There is no registration fee. If you register, you are allowed to use the program as a free software, and we will inform you about future upgrades.
You can download the files either in zip or in tgz format.
2. Include jseyes.js from the head of your page
Insert the following line into the head of your page:
<script src="jseyes.js"></script>
You can accept the defaults or assign new values to these variables:
jseyes= { img:"jseyes.gif", w:150, h:150, link:"http://www.propix.hu" };
The main image (img), size (w, h), and onclick link (link).
jseye1= { img:"jseyeblue.gif", w:21, h:29, x:46, y:58, xr:7, yr:17 };
jseye2= { img:"jseyeblue.gif", w:21, h:29, x:102, y:58, xr:7, yr:17 };
The eyes image (img), size (w, h), position (x, y), radius (xr, yr).
Other images: jseyegreen.gif, jseyebrown.gif, jseyegrey.gif, jseyeblack.gif, jseyerainbow.gif.
jseyesdeltat= 40;
Update rate in ms. Normally you do not modify it.
jseyesfollow= 100;
Mouse trailing speed in percents (1..199).
180%=crazy, 100%=fast, 50%=nice, 10%=slow, 5%=sleepy.
A funny example from Aric Boyles where it is used.
Call jseyeswr() where you want to see the image.
<script>jseyeswr()</script>
Or call jseyeswr(x, y) to define absolute coordinates.
<script>jseyeswr(100,100)</script>