PDA

View Full Version : Tweaking Pausing Up-down Scroller



Jerol
05-22-2006, 12:36 PM
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/showthread.php?t=8274&highlight=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

jscheuer1
05-22-2006, 05:57 PM
http://home.comcast.net/~jscheuer1/side/marquee_v_slide_pause_top.htm

Jerol
05-22-2006, 10:04 PM
Thank you for sharing this solution!

Regards,
Jerol

Jerol
05-23-2006, 04:00 AM
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.

Jack
05-23-2006, 04:16 AM
Hehe... that was kinda cool... Love those little extras! :)

jscheuer1
05-23-2006, 04:47 AM
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:


window.onload=populate

And adding it into your body tag like so:


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

Jerol
05-23-2006, 07:45 PM
That fixed it! Thanks, John.

Regards,
Jerol