View Full Version : Script Title: Ultimate Fade-in slideshow

09-25-2008, 10:23 PM
1) Script Title: Ultimate Fade-in slideshow (v1.51)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: Am I suppose to put my images in a special folder so the script can identify the images used in the slide show? I just have the images in an 'Images' folder in the sites main folder. I am using Dreamweaver and when I go to the design view, nothing shows up as if I did not do anything yet. I am using the scripts Array name of fadeimages... am I suppose to type out a full path? Any help is appreciated.


09-26-2008, 01:28 AM
You can configure the location of your images.

Let me quote this part:

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

...highlighted is the location of your images, which means, it's just placed on the root folder.

If you're images is in Images folder, you should prefix it with Images too:

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

If nothing works, please provide a link to the page in question

Hopet that makes sense.

09-26-2008, 01:34 AM
Note for Ragana's script:
You cannot just put teh folder in and then the file name if the folder is in a parent directory, then you would have to use the dots. If that makes sence "Yeah!!," if it doesn't tell me. :)

09-26-2008, 01:25 PM
It's really rather simple. It's just like the src attribute of an ordinary image tag. Say you have an image tag that works:

<img src="some.jpg" alt="">

Then you would just do:

fadeimages[0]=["some.jpg", "", ""] //plain image syntax

And just like an ordinary image tag, you can include absolute or relative paths to the image file if necessary/desired. Just make sure that the image is where you are telling the code that it is. Relative paths:

<img src="../images/some.jpg" alt="">

fadeimages[0]=["../images/some.jpg", "", ""] //plain image syntax

Absolute paths:

<img src="http://www.mydomain.com/images/some.jpg" alt="">

fadeimages[0]=["http://www.mydomain.com/images/some.jpg", "", ""] //plain image syntax

09-28-2008, 05:20 PM
I listed the relative path as suggested and it still does not show up... see attached file.

09-28-2008, 06:38 PM

from your file:

var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["..images/CGD-logo.jpg", "", ""]
fadeimages[1]=["..images/concretedirt.jpg", "", ""]
fadeimages[2]=["..images/RoadMagnet.jpg", "", ""]

Is not a valid path. Use like:

fadeimages[0]=["../images/CGD-logo.jpg", "", ""]

However, just because you use a valid path, it won't make any difference if the image isn't actually where that path says that it is. So, if you are still having problems, please post a link to a live version of your page - it can just be a demo, and doesn't have to work:

Please post a link to the page on your site that contains the problematic code so we can check it out.

09-28-2008, 07:19 PM
Still didn't work with the extra slash... I don't have a live version of this. I will see what I can do to get it to you another way. I had just copied the code into notepad and sent to you before. My images are stored into an 'Images' folder in my main site's folder. Is the forgotten slash all you saw was wrong with the code?

09-28-2008, 09:42 PM
It is so much easier to diagnose a live page, otherwise we are just guessing. I can tell you that if your folder is really called:


you will never get to it by referencing it as (from your source in the attached file):


10-02-2008, 10:40 PM
Okay, I made the page live and wouldn't you know... the slideshow works. I couldn't get it to work on Firefox though. But on Explorer and Chrome it seems to be fine. I still have a couple of questions though, please be patient will me as I am new to web designing, but why does the page have to be live in order to see it? When I am in dreamweaver designing it and then go to view it through a browser from my local site it doesn't show up... nor does it show anything in the design view of dreamweaver... not even the first slide. Is this how javascripts usually work? Also, is this a better way to go as far as creating a slideshow as opposed to using Dreamweaver's built in Flash 'Image Viewer'? If it is why?

Here is the link to the live site but it is only a demo: www.kcallander.com

10-03-2008, 08:04 AM
It's working in FF here. The dimensions:

new fadeshow(fadeimages, 140, 225, 0, 3000, 1, "R")

are off, those are the ones from the demo. Your images are of varying dimensions and larger than that. You should resize them in an image editing program to all be the same size and then set the dimensions for the show to that size.

Most complex scripts will not work in the design view of most editors. I have no idea what the problem is in viewing the page locally in your browser. Unless you are referring to IE's refusal to show local scripts without an OK from you, something must not be where the browser expects to find it, or your local copy has errors. I view scripts (including this one) locally all the time with no problem.

The choice between javascript and Flash has many aspects. Either method can have advantages and disadvantages that depend more upon what else you are doing with your page than upon anything intrinsic. I have no experience with Dreamweaver's built in Flash 'Image Viewer', so cannot comment on it specifically.

If one or the other is both easier for you to work with and looks the way you want it to, I'd go for that one. Otherwise you just have to work with one or the other until you get what you are after. Support for javascript (if it is written well enough, as this script is) is slightly more universal than Flash, but both are very well supported around the web, though neither one 100%.

10-04-2008, 02:11 PM
Thanks John, I have one more question... I want to create a link to start the slideshow. So basically, I don't want it to automatically start playing when one gets to the page... I want to have maybe 3 different links on the left for 3 different slideshows and when one clicks on the first link, the show starts playing on the right... then if you click the second link, the second slideshow starts playing instead-in the same location of the first slideshow. The links to start the play of the slideshow, should I do this with 'behaviors' or is there another way to achieve this?

Thanks again,