Click to See Complete Forum and Search --> : new question:horiz scroll too SLOW!


sol8air
06-27-2003, 06:54 AM
This is a nice looking horizontal scroller but nothing I do makes it scroll faster. In the setInterval parameter, the larger the number the slower it goes, and it won't accept negative numbers or decimals like .5 or 0.5. 1 seems to be its top speed unless I am doing it wrong. It also has no way of setting the timeout between repeats (which is also very slow). There must be something I can add or change to fix this.

The other problem is positioning. I don't understand the offsetParent parameters - pixels I get, this I don't. I'd like to be able to put it where ever I want, at least vertically.

So, can this code be manipulated to go faster and be at least somewhat positionable, or does someone have a better one? I kind of like that it's not in a little text box like other tickers I've seen (although those are MUCH easier to manipulate) and that I can change the font size at will, but I'm happy to try a different code altogether if I need to for a better result.

http://testsites.awcreations.com/testpage/testpage1x.html

kj
sol8air@aol.com

Mr J
06-27-2003, 12:01 PM
In function tick, first line

Change

l = l - 0.5;


To

l = l - 50;

Change the 50 to suit

David Harrison
06-27-2003, 02:11 PM
Sorry, but I gotta ask, what's this about:
<BODY BGCOLOR="white" LINK="red" VLINK="green" <BODY OnLoad="tickinit()">

and why is there another body taginside the head?

Mr J
06-27-2003, 04:34 PM
Oh dear yes, in your page you have



<BODY bgcolor="ccffee" background="http://awcreations.com/art/awcbgltgrn.gif" marginwidth="0"
marginheight="0" leftmargin="0" topmargin="0">

in the HEAD section as well as
<BODY BGCOLOR="white" LINK="red" VLINK="green" <BODY OnLoad="tickinit()">

this really needs sorting to this


<BODY bgcolor="ccffee" background="http://awcreations.com/art/awcbgltgrn.gif" marginwidth="0"
marginheight="0" leftmargin="0" topmargin="0" OnLoad="tickinit()">

maybe?

David Harrison
06-27-2003, 04:57 PM
I'd also recommend putting as much of the stuff from the body tag into css
so for instance all of the things about margins can be shrunk down to:
body{margin:0;}

sol8air
06-28-2003, 01:29 AM
Thanks.
The redundant tags are partly specific to the editing program (if I use Dreamweaver I can find these and clean them up but WebStudio 1.0 was more expedient for this test site, one adds bits of code and it adds extra tags). Thanks for pointing them out, I probably have a lot more to clean up that I'll specifically go looking for now.
I haven't learned CSS yet-- it's on the list tho. I've only recently discovered the joy of an external js file and adding CSS sounds like I can simplify life even more.
I am entirely self taught so I grab it where and when I can. :)

kj