Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transitioning rotating images

Status
Not open for further replies.

RodS2

IS-IT--Management
Sep 11, 2007
33
0
0
US
Hi All, finally have rotating images working, I found a very simple example and it worked. Anyway, is there anyway to add a transitioning affect to it somehow? I like how it works, but it just all seems too abrupt





<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="javascript" type="text/javascript">

img2 = new Image()


seconds = "2";

function imgOne()
{
setTimeout("imgTwo()", seconds * 1000);
}
function imgTwo()
{
document.myimg.src = 'two.gif';
setTimeout("imgThree()", seconds * 1000);
}
function imgThree()
{
document.myimg.src = 'three.gif';
setTimeout("imgOne()", seconds * 1000);
}
</script>

</head>

<body onload="imgOne();">
<img src="one.gif" name="myimg">
</body>
</html>
 
There are numerous scripts available with mootools or jquery that would do that for you. But it is a Javascript question and should be posted in forum216.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
I'm slightly miffed to have spent quite some time answering your question (thread248-1408856) only to find that you've solved it without telling anyone!

Vragabond is right - JS questions in JS forum, but you should first read the documentation on the site you got your code from ( - the answers are fully documented there.

You might also re-read faq222-2244, especially the bit about basic research

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top