picture transitions

M

Max

I have a site where I want to include 4 photos. I have
set it up to change pictures on mouse over; however, I
would like for them to rotate automatically. Is this
possible with Frontpage 2002 and if so, how do I do it.
Thanks for your help.
 
J

Jim Buyens

-----Original Message-----
I have a site where I want to include 4 photos. I have
set it up to change pictures on mouse over; however, I
would like for them to rotate automatically. Is this
possible with Frontpage 2002 and if so, how do I do it.
Thanks for your help.

You would have to write some javascript to do this.
However, what do you mean by "rotate automatically"? For
example, do you mean:

o Mouse over, mouse out, mouse over, mouse out
displays pictures 1, 2, 3, 4?
o The pictures change automatically every few seconds?
o Something else?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
V

Vocátional© & Technicál© Educátion®

<script language="JavaScript">
<!--
var viewPix = new
Array("http://website/images/1.gif","http://website/images/2.gif","http://we
bsite/images/3.gif")
var thisImage = 0
function doPast() {
if (document.images && thisImage > 0) {
thisImage--
document.myShow.src=viewPix[thisImage]
}
}
function doAfter() {
if (document.images && thisImage < 2) {
thisImage++
document.myShow.src=viewPix[thisImage]
}
}
// -->
</script>
<div align="center"><img name="myShow" src="http://website/images/1.gif"
width="468" height="60"><br><a href="javascript:doPast()">Previous</a>
<a href="javascript:doAfter()">Next</a></div>
 
J

Jim Buyens

The pictures change automatically every few seconds.

OK, try this.

<html>
<head>
<title>Rotate Pictures</title>
<script language="JavaScript">
picNr = 0;
picName = new Array("bear_cub.jpg",
"cow.jpg",
"alligator-1.jpg");

function rotatePics(){
document.rotating.src = "images/" + picName[picNr];
if (picNr < picName.length - 1) {
picNr = picNr + 1;
}else{
picNr = 0;
}
setTimeout("rotatePics();",5000);
}
</script>
</head>
<body onLoad="rotatePics();">
<img name="rotating" border="0" src="images/alligator-1.jpg">
</body>
</html>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Top