Forum Moderators: open

Message Too Old, No Replies

rotating image html question

         

reneewood

3:31 pm on Aug 21, 2003 (gmt 0)

10+ Year Member



Quick question from a newbie. I'd like the image on my homepage to rotate with for or so different products that I carry. Is this possible? Is it just a special html? If so, can anyone point me in the direction for learning more about this? Gratefully, Renee

Clarify...I don't want the image to rotate around on the page, I want one image to be shown for a few seconds and then another image replaces it.

pageoneresults

3:37 pm on Aug 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello Renee, this is usually done with a piece of javascript. You might want to search your favorite SE for "rotating images script" or something similar. There are quite a few of them out there.

korkus2000

7:21 pm on Aug 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not use an animated gif for this?

henry0

11:16 pm on Aug 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use that one
it rotates 3 pic
you can figure how to tweak it to your need

IN the Head
<!-- PreLoad Show -->
<script language="JavaScript">
var myimages=new Array();
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image();
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("img/mild.jpg","img/medium.jpg","img/hot.jpg")
</script>

<!-- Show -->
<script language="JavaScript1.1">
<!--

var slideimages=new Array()

function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i]
}
}
function slideshowlinks(){

}
//-->
</script>

In Body
<!-- Start show -->
<img src=" " name="slide" height="133" width="329" border="0"></a>
<script>
<!--
slideshowimages("img/mild.jpg","img/medium.jpg","img/hot.jpg")

var slideshowspeed=3500

var whichimage=0
function slideit(){
if (!document.images)
return
document.images.slide.src=slideimages[whichimage].src
whichlink=whichimage
if (whichimage<slideimages.length-1)
whichimage++
else
whichimage=0
setTimeout("slideit()",slideshowspeed)
}
slideit()
//-->
</script>

MonkeeSage

9:34 am on Aug 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a very nice slideshow template that I wrote just earlier today for my little brother (he wanted a dinosaur slideshow...he loves the BBC shows about walking with dinosaurs and all that...but I digress).

It's pretty fancy pantsy and may be more than you are wanting (variable speed, bi-directional, manual advance and decline, zoom in and out, works in IE / NN / Opera). It is about 200 lines of code and HTML (bit less if I despace it for posting), so I don't want to post it unless needed.

So let me know if you want it.

Jordan

Alfasys

10:16 am on Aug 22, 2003 (gmt 0)

10+ Year Member



Hi Renee,

you can also make a flash movie and embed it in the source of your page. If you are not so familiar with this, you can buy SWiSH 2 (http://www.swishzone.com). This is a low cost version similar to Flash. Success.
Karl

Ryan8720

7:25 pm on Aug 22, 2003 (gmt 0)

10+ Year Member



My banner on <snip> does that. I also added a transition effect. Feel free to use the code if you'd like.

You could also do this with PHP or some other Server-side language.

[edited by: korkus2000 at 7:30 pm (utc) on Aug. 22, 2003]
[edit reason] No personal URLs please [/edit]