Click to See Complete Forum and Search --> : Longer "Line Scroller"


isofilm
02-05-2004, 11:59 AM
Can the JavaScript "Line Scroller" by Ernst Straka be modified to accommodate longer text, such as 10,000 pixels in length?

As it is, around 4000 pixels or so, it starts over.

Here is the link to the script:

http://javascript.internet.com/scrolls/line-scroller.html

Thanks

Pittimann
02-05-2004, 12:20 PM
Hi!

How big is your sreen???

The value for the width in the script is 400 pixels. Did you have 1000 or really 10000 in mind??

Cheers - Pit

isofilm
02-05-2004, 12:29 PM
Hi,

The size of the scroller window is not my problem, its the length (in pixels) of text the scoller will accommodate.

For instance, my text at 22 points is around 8600 pixels long, and after the scoller gets to about 4000 pixels, it starts over.

If I reduce my text size to 8 points or so, the entire message scrolls.

So it seems like there is a text pixel length limit?

Thanks

isofilm
02-05-2004, 12:54 PM
Hi,

I have another clue - the text length limit is about twice the window size.

Hope this helps.

Thanks

Pittimann
02-05-2004, 01:29 PM
Hi!

The second line in the function tick() is decisive.

The original:
if (l < l3) l = l2;

Please add a value like this:
if (l+2200 < l3) l = l2;

You'll have to experiment a bit to find the value fitting to your text length...

For testing change the first line in that function to make it scroll faster.

Example (original is "l = l - 0.5;"): l = l - 5.5;

Cheers - Pit

isofilm
02-05-2004, 01:36 PM
Hi Pittiman,

YOU ARE THE MAN!

It works perfectly.

Thanks

Pittimann
02-05-2004, 01:46 PM
Hi!

You're welcome! :p

Cheers - Pit