Results 1 to 4 of 4

Thread: Fading Scroller time error

  1. #1
    Join Date
    Jul 2006
    Location
    San Diego
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Fading Scroller time error

    1) Script Title: Fading Scroller

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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 !

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Code:
    var delay = 10000
    1000 milliseconds = 1 second
    - Mike

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Total time taken = maxsteps * stepdelay + delay.
    So, perhaps, maxsteps = 20; stepdelay = 50; delay = 9000.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Right, because maxsteps * stepdelay is the the time when the fade actually happens. I didn't think of that
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •