Random image rotator using javascript

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
tamlyn

Random image rotator using javascript

Post by tamlyn »

I need to display an image that changes every x seconds. The images are randomly selected from a directory on the server. I don't want any javascript in the page body and preferably none in the page at all (i.e. all in an external script). I would also like to be able to have several such images on the same page and each have a different delay. I need to make a plugin or module but I just can't work out how to set it up.

I thought of storing the images as a list in the source and using css and javascript to make them look like just one image but that seems a bit messy and I'd rather it degraded to a single static image than to a list of images (the actual images aren't that important).

Any better ideas?
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Random image rotator using javascript

Post by Elijah Lofgren »

Maybe one of these would be useful?
Random Image: http://dev.cmsmadesimple.org/projects/rndimg/
Multiple random image: http://dev.cmsmadesimple.org/projects/multi-rand-img/
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
tamlyn

Re: Random image rotator using javascript

Post by tamlyn »

No I need to use javascript to change the image every x seconds, like a slideshow.

Currently I'm leaning towards using ajax to fetch an xml file from the server (most likely php generated) which specifies the files to use in the slideshow. But I haven't really done much javascripting for a while now so it's quite slow work.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Random image rotator using javascript

Post by Dr.CSS »

have you looked at www.dynamicdrive.com/ lots of nice JS there

  mark
alby

Re: Random image rotator using javascript

Post by alby »

tamlyn wrote: No I need to use javascript to change the image every x seconds, like a slideshow.

Currently I'm leaning towards using ajax to fetch an xml file from the server (most likely php generated) which specifies the files to use in the slideshow. But I haven't really done much javascripting for a while now so it's quite slow work.
Maybe my plugin Image Rotator.
It's based on www.dynamicdrive.com

Alby
tamlyn

Re: Random image rotator using javascript

Post by tamlyn »

Thanks alby - dunno how I missed that on my initial search. It works really well and it's neat from a cms point of view though the code it creates isn't so nice (i.e. having js in the page source). But I reckon I can live with that for the time being ;) cheers!
Locked

Return to “Modules/Add-Ons”