Results 1 to 7 of 7

Thread: Tweaking Pausing Up-down Scroller

  1. #1
    Join Date
    May 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tweaking Pausing Up-down Scroller

    Pausing up-down Scroller
    http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

    I am looking to scroll continuously 20 logo gifs in a 400 px-high area using the above scoller. However, the script will only show the 2nd logo after the first has completed the 400px trip, as here...

    http://www.claytonequip.com/scroll1.html

    I would like to see continuously 3 logos in the "box" as they scroll up, as here...

    http://www.claytonequip.com/index053106.shtml

    What you see there is a hack, where I have put all the logos in one very long gif in array[0] with all logos spaced 50 px apart. It resulted in an "undefined" message at the end of the first loop so I added array[1]='&nbsp' (having at least 2 array elements seems to fix it). But I don't like my hack because these logos change and having one logo in each array element would be more flexible, and the long delay is apparent at the end of each loop.

    Drum roll here... Is there a way to make the script stop waiting until the previous array item finishes before starting the next one? If they were continuous, I think CSS padding could separate them appropriately.

    I did a forum search and this thread is similar...

    http://www.dynamicdrive.com/forums/s...hlight=pausing

    but then it trails off into php land instead of addressing this script (I think).

    I love the Pausing up-down scroller - I hope it can be tweaked to do my application.

    Thanks

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

  3. #3
    Join Date
    May 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for sharing this solution!

    Regards,
    Jerol

  4. #4
    Join Date
    May 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Prof, I'm sorry to report that your amended script, while it does the continuous scrolling I hoped for, breaks the other JS on my page. See here...

    http://www.claytonequip.com/index060106a.shtml

    Notice how my "Equipment" menu item no longer flies out.

    Here is where I used the original Pausing Up-down scroller (the hack where I have one very long gif in array[0] instead of many small gifs) and notice my menu does fly out...

    http://www.claytonequip.com/index060106.shtml

    I suspect your script somehow breaks the onload element in my body tag. I wonder if the primary part of your script was broken out into a separate js file if it would still conflict. I'm not good enough with JS to know if that would matter. As you can see, no JS error messages are thrown.

  5. #5
    Join Date
    May 2006
    Posts
    259
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Hehe... that was kinda cool... Love those little extras!
    "Only dead fish flow with the stream".
    - Unknown

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Jerol
    Prof, I'm sorry to report that your amended script, while it does the continuous scrolling I hoped for, breaks the other JS on my page. See here...

    http://www.claytonequip.com/index060106a.shtml

    Notice how my "Equipment" menu item no longer flies out.

    Here is where I used the original Pausing Up-down scroller (the hack where I have one very long gif in array[0] instead of many small gifs) and notice my menu does fly out...

    http://www.claytonequip.com/index060106.shtml

    I suspect your script somehow breaks the onload element in my body tag. I wonder if the primary part of your script was broken out into a separate js file if it would still conflict. I'm not good enough with JS to know if that would matter. As you can see, no JS error messages are thrown.
    Looks like you are right. Try removing this line from the script:

    Code:
    window.onload=populate
    And adding it into your body tag like so:

    Code:
    <body onLoad="populate();P7_initPM(0,16,1,-20,10);P7_equalCols('c1','c2','c3')">
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    May 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That fixed it! Thanks, John.

    Regards,
    Jerol

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
  •