1) gauteGroup: Members Posts: 13Joined: 28 Sep 2005Location: NorwayIP: 217.65.--.--
Posted:
Hi. We are once again making use of your fine scripts :) This time at: http://www.xpublish.no/gm/xp/pub/topp/hovedside/index.html We may have eliminated a whole lot of nasty flash integration here :) On second thougt however, we think our customer might object to the quite noticable flicker and stutter, compared to the flash mockup he was shown... Is there anything we can do about this?
Regards
Gaute Amundsen
2) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 203.109.--.--
Posted:
Well, the smoothness comes down to 2 things, the scroll amount and the timer. The timer at the moment is 50ms (search through the source for setInterval), you could try lowering that a little but I'm not sure how good the return would be. Lowering the scroll amount will also increase smoothness -- for your layout, you might want to vary the scroll amount based on the distance from the centre?
Also, I note that the page in question doesn't appear to have a link back to www.twinhelix.com on it (as per script license) -- are you considering making a donation perhaps for this site?
Good luck - Angus.
3) gauteGroup: Members Posts: 13Joined: 28 Sep 2005Location: NorwayIP: 217.65.--.--
Posted:
Played around a bit now with amount and timer, and it does indeed make some difference. With interval of 5 and scroll amount of 1, it is pretty smooth :) Thing is, that every odd moment it sort of snaggs a bit. I tried setting the resizeBugCheck to "every century" or so, without effect, so that cant be it. On another box and another OS, it looks much better, so I suppose it must be something external to the script. How about getting "closer to the metal" somehow, or sync with screen refresh or absolute time? Might be a bit more r&d then this case warants, but is it even possible?
Vary scroll amount based on the distance from the centre? Oh yes :) that would be nice. I could cobble it together I am sure, but I am not confident it would be very robust, so some hints would be appreciated :)
Another thing as well.. I had to put a <div style="width: 1350px;"> around the table that is really the content. Otherwise it would not scroll. A way to avoid that, so that the customer dosn't run into complications when they expand or contract it, would be nice. I tried removing the width="100%" on the table, but with no effect.
Donation? That was the plan, yes :) As soon as we know we wont be forced back to using flash.
Regards
Gaute Aamundsen
4) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 203.109.--.--
Posted:
Sadly JS doesn't allow you to get "that close to the metal" :). DIfferent browsers will have different "smoothnesses"; with the right timer settings, getting as smooth as possible should be OK.
I would For the variable scroll amounts -- easy! Just duplicate the DIVs where you call the setScroll() function, with the ones positioned closer to the edge of the area calling setScroll() with higher scroll values. That way you can have smooth 1px scrolling in the middle and faster scrolling on the outside, plus it's very user friendly that way!
And if you can make a donation -- thank you very much in advance!
Good luck - Angus.
5) gauteGroup: Members Posts: 13Joined: 28 Sep 2005Location: NorwayIP: 217.65.--.--
Posted:
Ok. I guess I was expecting that answer :)
Variable scroll amounts by multiple trigger areas, yes I had thougt of that option. It seemed a little crude, so i haven't bothered yet. I thougt perhaps you had something in mind that relied on the distance frome some edge as read by javascript, but never mind. There are more pressing matters now. :(
I am told we have donated to you before a couple of times, but beware that Things Take Time allso ;-)
Thanks
Gaute
6) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 203.109.--.--
Posted:
Oh, you could read the mouse position, but it'd be easier just to have several areas (as you aren't going to need more than, say, 4 or 5 speeds each way).
Thanks for your support in the past, in that case!