Today is . Page created 08/25/02, updated 03/18/07

Float Floating Butterflies Butterflies

Click on a floating image to make them all vanish
Refresh page to bring them back

This is a very unique script for the simple fact it allows to to add or subtract any number of images, either the same or different.

We have tested the code in IE7.0, IE6, IE5.5, Firefox2.0.0.2, Opera9.10, Netscape4.08, Netscape8.1.2 and AOL Explorer1.5. and This script worked well in all platforms tested with one (1) variation observed in Firefox2.0.0.2 and Netscape8.1.2.

Depending on your knowledge of HTML and javascripts this is an easy, one (1) part copy and paste code (with minimal reconfigurations) that is positioned at the bottom of your document just above the closing </BODY> tag.

Other than the copy and paste you need to also upload the butterfly image to your directory from the script page if you want to use it. This is the unique part that you can also use any image(s) you want by just substituting them with the default. There is only one place to reconfigure the script so it will work on your page. The default comes with the two animated butterflies (that you can upload from the script site) and we have added an angel and a cupid to the reconfigurations. First we will show the default section and then the reconfiguration section of the script.

Default

//FLOATING IMAGE URLS FOR EACH IMAGE. ADD OR DELETE ENTRIES. KEEP ELEMENT NUMERICAL
ORDER STARTING WITH "0" !!

var floatimages=new Array();
floatimages[0]='butterfly2.gif ';
floatimages[1]='butterfly2.gif ';

//*********DO NOT EDIT BELOW***********

Reconfigured

//FLOATING IMAGE URLS FOR EACH IMAGE. ADD OR DELETE ENTRIES. KEEP ELEMENT NUMERICAL
ORDER STARTING WITH "0" !!

var floatimages=new Array();
floatimages[0]='Your Complete URL Path/butterfly2.gif ';
floatimages[1]='Your Complete URL Path/butterfly2.gif ';
floatimages[2]='Your Complete URL Path/lftangel.gif ';
floatimages[3]='Your Complete URL Path/cute.gif ';

//*********DO NOT EDIT BELOW***********

If you also will notice we have used the complete URL path to our image instead of just the image name in the default. This is proper HTML coding unless it is within a script and it specifies different. It loads faster because it tells the computer the exact path to find instead of just the image.

One other thing you need to be very careful about is the error people make when reconfiguring scripts. This script makes use of a single apostrophe ' within your URL configurations. Don't make the mistake of adding the quotation mark " instead. You will get errors on your page and will wonder why.

Technical Note     This script accesses the BODY onload event or in this case the (window.onload). If you have another script on your page that does the same, one of them will not run. Grab the below link for information on getting both scripts to work simultaneously.
Script Conflict ]

If you would like either the cupid or the angel, just save these and upload them to your editor.
Cupid       Angel

Add-On Not Included In Script Little Extra Not Included In The Script:     Since this script is rather large (4.58 KB or 4,693 bytes). You may want to consider making it into an external.js file and call it from an external location. If you need a little refresher on howto, see below:

The <BODY> section of code starts and ends with opening and closing JavaScript tags, See below:

  • Opens With:
    <script language="JavaScript1.2">

    <BODY> Section of code goes here

  • Closes With:
    </script>
  1. Remove the opening and closing JavaScript tags.
  2. Copy/cut and paste everything in-between into a notepad and save it as floatingButterflies.js*
  3. The newly created (Saved As) file will look something like this   floatingButterflies.js
  4. Upload the newly created floatingButterflies.js into your directory
  5. Paste the below snipplet of code into the <BODY> section of your document (just above the closing </BODY> tag ) to call floatingButterflies.js
    <script type="text/javascript" src="floatingButterflies.js"> </script>
  6. If you have uploaded the floatingButterflies.js into a different directory, you will have to change the path of the above to reflect the location.
  7. If changing the path is a little confusing, grab the below link and it is explained in detail.
    Upload To Different Directory ]

For Your Information For your Information:     If you happen to have this effect on more than one of your pages and decide to change the image(s), with it being called from an external location, you can reconfigure the image(s) right from the external file in your directory only once and the change will be reflected on all the pages you have this effect. This makes changing the image(s) much easier and quicker.

* We named our external.js file floatingButterflies.js. This is just so we know what it is to at any given moment. You can name it anything you want. This is entirely up to you on this.

If you would like to see an example of this effect with the use of the external.js file in the <BODY> section, grab the below link and you are there.
Floating Butterflies With External.JS File ]

We hope our tutorial was easy to follow and we covered everything in detail. If you would like to add this effect into your pages, grab the respective below link and you are there. If you have any problems with this or anything else, feel free to consult our FAQ ] and if you can't find the answer there, contact us ].
Get Code Here ]   [ Rate This Page ]  

Talk Live To A Support Technician

Search Our Site By Individual letter

A ]  [ B ]  [ C ]  [ D ]  [ E ]  [ F ]  [ G ]  [ H ]  [ I ]  [ J-K ]  [ L ] 
M ]  [ N-O ]  [ P-Q ]  [ R ]  [ S ]  [ T ]  [ U-V ]  [ W ]  [ X-Y-Z ] 

Little Tips Directory

Page 1  ] [ Page 2 ] [ Page 3 ] [ Page 4 ] [ Page 5  ] [ Page 6  ] [ Page 7  ]

Index Page 1 ] [ Index Page 2 ] [ Index Page 3 ] [ Index Page 4 ] [ Index Page 5 ]
Index Page 6 ] [ Index Page 7 ] [ Index Page 8 ] [ Index Page 9 ] [ Index Page 10 ]
Index Page 11 ] [ Index Page 12 ] [ Index Page 13 ] [ Form Index ]
2001 ] [ 2002 ] [ 2003 ] [ 2004 ] [ 2005 ] [ 2006 ] [ 2007 ]

News Letter Archives ] [ Navigation Page ] [ Archives Of Published Material ]
Link To Us ] [ Alphabet Index ] [ Feedback ] [ On Line Support ] [ FAQ ]
Webmaster Utilities ] [ Casino ] [ Banner Exchange ] [  Advanced Site Search ]

If you are part of the ever growing number of webmasters who enjoy sharing your knowledge with others on web design, join The Consigliere Ltd. web ring to broaden your scope of exposure.
Join Today

This Site Was Built And Is Maintained Exclusively by
The Webmaster @ Consigliere Ltd.

Copyright © Consigliere Ltd., All Rights Reserved. 2001-