PDA

View Full Version : Fading images (setting the height)



elliot
05-27-2006, 08:30 PM
Hi there,

I've gone and added the fade image technique from http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm which fits into my website nicely... Just one small question, I've been able to give it the correct width though how do I set the height? It did explain I'm sure though I can't seem to work it out... sorry

here's it in my website http://www.fuelimages.com/courses_new2.html

many thank,
elliot

jscheuer1
05-29-2006, 07:33 AM
You've kind of missed the point on a number of things with this script. Where you have this:


<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 140, 225, 0, 3000, 1, "R")
new fadeshow(fadeimages2, 140, 225, 0, 3000, 0)

</script>

It should be:


<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 429, 429, 0, 3000, 1)

</script>

And, where you have this:


var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["../img/WEBGRAPHIC1.jpg", "", ""] //plain image syntax
fadeimages[1]=["../img/WEBGRAPHIC2.jpg", "http://www.cssdrive.com", ""] //image with link syntax
fadeimages[2]=["../img/WEBGRAPHIC1.jpg", "http://www.javascriptkit.com", "_blank"] //image with link and target syntax

var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["../img/WEBGRAPHIC1.jpg", "", ""] //plain image syntax
fadeimages[1]=["../img/WEBGRAPHIC2.jpg", "http://www.cssdrive.com", ""] //image with link syntax
fadeimages[2]=["../img/WEBGRAPHIC1.jpg", "http://www.javascriptkit.com", "_blank"] //image with link and target syntax

var fadebgcolor="white"

////NO need to edit beyond here/////////////

It should be:


var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["../img/WEBGRAPHIC1.jpg", "", ""] //plain image syntax
fadeimages[1]=["../img/WEBGRAPHIC2.jpg", "", ""] //plain image syntax

var fadebgcolor="white"

////NO need to edit beyond here/////////////

BTW, anything that follows // to the end of the line is a comment/instructions.

elliot
05-29-2006, 11:09 AM
John, thank you very much for your time :o

All sorted now!!

all the best,
elliot