PDA

View Full Version : Fading Scroller time error



capt_cabo
08-01-2006, 12:56 AM
1) Script Title: Fading Scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/fadescroll.htm

3) Describe problem:

I need the Fading Scroller to function at a precise time interval, say every 10 seconds. The fading effect is throwing off the timing of the script. The time fading parameters are as follows:

var delay = 2000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect

I have tried a number of combinations to achieve a 10 second rotation but all efforts have failed.

Any help is greatly appreciated !

mburt
08-01-2006, 01:01 AM
var delay = 10000

1000 milliseconds = 1 second

Twey
08-01-2006, 01:45 AM
Total time taken = maxsteps * stepdelay + delay.
So, perhaps, maxsteps = 20; stepdelay = 50; delay = 9000.

mburt
08-01-2006, 02:04 AM
Right, because maxsteps * stepdelay is the the time when the fade actually happens. I didn't think of that