Ants | JavaScriptSource


Mike Hall Sep 9, 2000
As you move your mouse around the page a swarming army of ants scattered about the window will chase after it. (No wisecracks about buggy code now...) If an ant actually reaches the mouse cursor, we reposition it randomly around the edge of the window, and its chase starts again. The ant images are preloaded with a great image loading bar script, then the script begins. A great effect!

Ants Screenshot

To the right you will find a screenshot of the 'Ants' script in use rather than the usual live example. Based on the overwhelming number of sites (200+) that were calling the ants images from our site, we had to remove the live Ants example and the ant images from our web server. This will help decrease the stress on our server and ensure that the entire network is always accessible to you, the user.

However, you can still put this script on your site as usual. Just copy the ants source code in the box below and download the ants images zip below the screenshot. This zip file contains all the ant images.

Screenshot of Ants Script

Click here to download

The JavaScript Source: Games: Ants

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!


Did you use this script?  Do you like this site?  Please link to us!

Leave a Response


didn't work. waste of time

salman Sep 10, 2015

Can I make a Different img move around and if so, what changes do I need to make

GastricHarp Jun 10, 2015

My code is not working...

Bhaskar Malladi Feb 1, 2015

very intersted code

gebregewergs Feb 4, 2014