|
|
|
Flipper(width,height,imageList)
FlipperLong(width,height,speed,imageList)
width,height: the image width, height (use -1 for non-fixed)
imageList A string containing a list of space seperated images
speed Number of milli seconds between flips (default 5000 - 5 seconds)
Include flipper.txt in the HEAD section of you document.
Add a function call inside your document:
<script language="javascript">
Flipper(152,136,"dog2-small.gif condo-view-small.gif hiking1-small.gif
hiking2-small.gif malanda-small.gif snowball-small.gif snowcamping-small.gif
spider1-small.gif spider3-small.gif ");
</script>
<br>
flipper.txt
===========
<SCRIPT language="javascript">
<!-- Sheilds up
// Image Flipper - Cameron Gregory - cameron@bloke.com
// http://www.bloke.com/
// http://www.bloke.com/javascript/Flipper/
// http://www.bloke.com/javascript/Flipper/link.html
function changeImage(r,i)
{
r.src=i;
}
function goFlipURL()
{
document.location = urlSet[currentFlip];
}
function flipFlipper(imageSet,speed)
{
currentFlip ++;
if (currentFlip == imageSet.length)
currentFlip=0;
changeImage(document.flip,imageSet[currentFlip]);
setTimeout("flipFlipper(imageSet,speed)", speed)
}
function FlipperLong(width,height,s,images)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
speed = s;
si = 0;
ci=0;
cc=0;
imageSet = new Array();
ei = images.length;
for (i=1;i<ei;i++) {
if (images.charAt(i) == ' ') {
imageSet[cc] = images.substring(si,i);
cc++;
si=i+1;
}
}
currentFlip = 0;
document.write("<img name='flip'");
if (width >0)
document.write("width="+width);
if (height >0)
document.write(" height=" +height);
document.writeln(" src=" +imageSet[0]+ ">");
setTimeout("flipFlipper(imageSet,speed)", speed)
}
function Flipper(width,height,images)
{
speed=5000;
FlipperLong(width,height,speed,images);
}
function FlipperLinkLong(width,height,s,images,urls)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
speed = s;
imageSet = new Array();
urlSet = new Array();
si = 0;
ci=0;
cc=0;
ei = images.length;
for (i=1;i<ei;i++) {
if (images.charAt(i) == ' ') {
imageSet[cc]= images.substring(si,i);
cc++;
si=i+1;
}
}
si = 0;
ci=0;
ccu=0;
ei = urls.length;
for (i=1;i<ei;i++) {
if (urls.charAt(i) == ' ') {
urlSet[ccu]= urls.substring(si,i);
ccu++;
si=i+1;
}
}
currentFlip = 0;
document.write("<a href=\"javascript:goFlipURL()\"><img name='flip'");
document.write("<img name='flip'");
if (width >0)
document.write("width="+width);
if (height >0)
document.write(" height=" +height);
document.writeln(" src=" +imageSet[0]+ "></a>");
setTimeout("flipFlipper(imageSet,speed)", speed)
}
function FlipperLink(width,height,images,urls)
{
speed=5000;
FlipperLinkLong(width,height,speed,images,urls);
}
// sheilds down -->
</SCRIPT>
|
|
| This is a script that list all image files on a given directory, and displays
the thumbnails nicely formated within an HTML table. It also make use of
JavScript to open pop up windows when the users want to see the full photo. Categories : Graphics, PHP, Complete Programs, Java Script | | | Random Image Categories : Java Script, Graphics | | | JAVASCRIPT interface class to the eBusiness Charts generatation remote service. Categories : Java Script, Graphics, Charts and Graphs | | | A ball is attached to your mouse cursor with an elastic cord! Categories : Java Script, DHTML, Graphics | | | Create Thumbnails - resize an image - jpeg, jpg, gif, png to the specifed width and height in proportion without loosing out on pixcel quality. Categories : PHP, GD image library, Graphics | | | Zephyr: AJAX Based Framework for PHP5 Developers Categories : PHP, AJAX, Frameworks, Java Script, Web Applications | | | AJAX XML HTTP Request - Compatible with almost browsers! Categories : AJAX, HTTP, Java Script | | | javascript doesn't accept a fieldname with [] Categories : Java Script | | | Array values from javascript to php Categories : PHP, Java Script, Arrays | | | Create HTML forms dynamicly using Javascript & PHP Categories : PHP, PHP Classes, Java Script | | | Linked comboboxes with php-mysql & javascript Categories : PHP, Java Script, Databases, MySQL | | | Random Image Display Categories : PHP, Filesystem, Graphics, HTML and PHP | | | The toll booth Categories : PHP, Java Script, Filesystem | | | MD5 secured login Categories : PHP, Java Script, Authentication, Security | | | Flash Detection Script with loads of features Categories : Java Script, Flash | |
|
|
|