PDA

View Full Version : Ultimate Fade-in conversion from 1.51 to 2.4



ChortleMortal2
09-11-2011, 05:24 AM
1) Script Title:
:: Ultimate Fade-in slideshow (v2.4)

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

3) Describe problem:
I am converting from version 1.51 to version 2.4 because there seem to be problems using 1.51 with IE9 related to opacity on mouseover.

I found 1.51 code very easy to read and understand, so I was able to make two modifications. I would like to be able to do the same for the new version but find the code incomprehensible (my lack of understanding).

What I would like to accomplish is:
1. On start, image has 100% opacity (rather than zero). So on loading the page the image is fully visible, but then automatically dissolves (cross-fades) to subsequent images.
2. I would like to put in the time to the first fade, which is different from subsequent fades. Right now there is a fade interval, but not an initial fade interval.

To see how I used it with 1.51 you can look at this home page:
http://www.shawlsunlimited.com but use Firefox or Chrome. You can see the problems using IE9.

jscheuer1
09-11-2011, 06:56 AM
Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

Just for clarity's sake, that's the source code of the page(s), not the source code of the script(s) used by the page(s).

That said, you could just change this:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<title>Shawls Unlimited: Shawls, s . . .

to:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Shawls Unlimited: Shawls, s

ChortleMortal2
09-11-2011, 04:31 PM
John,
Thank you so much for your speedy and helpful response.

1. I deeply apologise for not being in compliance with the usage terms. What is on the link you supplied is very direct and clear. I have rectified this and hope that what I just did is right and is in accordance with the very generous Terms of Use. (Previously I had the credit notice in the script file itself, but not where it was called from. Now it is in both).

2. Thanks for your help in fixing my problem. It is so amazingly obvious I have been kicking myself for not thinking of it myself. Thank you for your help. It has saved me from many additional hours of wasted effort.

3. I am attaching the script file with my modifications in the spirit of sharing and thinking that others might want the minor changes I made. All changes are indicated with //dac on the changed line. The calls I make are:
new fadeshow(fadeimages, 300, 225, 0, 9000, 1, -6000)
new fadeshow(fadeimages2, 300, 225, 0, 9000, 1, -3000)
new fadeshow(fadeimages3, 300, 225, 0, 9000, 1, 0)

jscheuer1
09-11-2011, 05:09 PM
In your attached script, line # 89, there's a typo:


slideHTML+='<img src="'+this.postimages[picindex].src+'" alt="'+this.theimages[picindex][2]+'" border="'+this`.imageborder+'px">' //dac

ChortleMortal2
09-11-2011, 06:31 PM
Once again thanks.
David