Hello Angus, hope you're doing good. I have to ask you something...
Briefly, I saw the inline box script in your web, I like it and now Iīm trying to customize this same script for the following purpose.
I want to use this script in a news rotator, by gradually scrolling the box while page is being displayed.
I have work out the following solution...
// **** START EDITING HERE ****
var scr = new InlineScrollbox('scr');
var update; // (1) my timer
var y = 0; // (2) starting position
var ilsOldOL = window.onload;
window.onload = function()
{
if (ilsOldOL) ilsOldOL();
scr.load('NEWS'); // (3) the scroller I'm using
// frequency of updates is 200 milliseconds
update = window.setInterval("scrollToY()",200);
}
// this function call the one you provided with
// inline box script, increasing y by two each call
function scrollToY() {
var inc = 2;
scr.scrollTo(0,y);
y = y + inc;
}
Although as you can probably see I have a problem, when the box reach its bottom, I donīt have a way to notice this condition in order to start it over.
Hope you can give and advise on this one. Thank you.
Omar V.M.
P.S. : I provide you with a testing link so you can look what I'm trying to do..
http://www.prodigyweb.net.mx/ovalerio/inline.htm