Metachecker.net
|
TrafficChecker.net
|
RankChecker.net
Learn Java Script Today
|
Over 5000 Free Fonts
|
Tutorials
|
Javascript Forum
|
Other Javascript Resources
|
Cheat Sheet
JavaScript Basics
Inserting Javascript
Complete Tutorial
Advance DHTML Tutorial
Script archive
Advanced Tutorials
Alert Scripts
Animation
Audio
Background Effects
Banner Ads
Browser Window
Buttons
Button Forms
Calculcators
Calendars
Clocks & Dates
Cookies
Cursor Effects
DHMTL Games
DHTML Miscellaneous
Equivalents
Forms
Games
IE4+ Scripts
IE5+ Scripts
Image Effects
Image Miscellaneous
Links & Buttons
Math Related
Messages Miscellaneous
Miscellaneous
Mouse Tricks
Navigation
Page Details
Password Protection
Pulldown Menus
Random Stuff
Scrolling
Status Bar
Text Animation
User Detail
User Info
Window Control
Switching Images
Insert into <HEAD>
<SCRIPT LANGUAGE="JavaScript"> <!-- Hide from old browsers function makeArray() { this.length = makeArray.arguments.length for (var i = 0; i < this.length; i++) this[i+1] = makeArray.arguments[i] } var teams = new makeArray ("IMAGE1.gif", "IMAGE2.gif", "IMAGE3.gif"); var eatMe = 1; function flipper() { document.form.image.src = teams[eatMe]; eatMe += 1; if (eatMe == 4) eatMe = 1; setTimeout("flipper()", 2000); } // --> </SCRIPT>
Insert into <BODY>
<body onLoad="flipper()"> <form name="form"> <IMG name=image border=0 SRC = "IMAGE.gif">
Other Options
An example is: <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="flipper()"> or <body onLoad="flipper()"> Now put this image where ever you want in your HTML document. it will be the switching image. Change the name "IMAGE.gif" to the image file that you want to start off with. <form name="form"> <IMG name=image border=0 SRC = "IMAGE.gif"> In the Head change the names of the images where it says 'IMAGE1.gif". You can add as many images as you want, just put them within the parenthesis, seperate them with a comma and put the file name in quotations. Another thing that you will have to change is the number "4" in the line "if (eatMe == 4) eatMe = 1;" put the number of images that you put in the script and add 1. For example, if you had 5 images, the number that you would put is "6".