H
huntingseasonson
Hi, I have set up the following page http://gertrudischale.com/cgi/
viewart.pl?lang=en&i=22 to scroll in the same direction one moves the
mouse. This works fine -except in IE- where the image tends to flicker
when the scrolling takes place.
Is there an alternative way to achieve the scrolling with out the
causing the flicker?
The code is as follows:
function moveImage(event)
{
if(!event) event = window.event;
if(document.lastX!=null&&document.lastY!=null) {
document.body.scrollLeft = (event.screenX > document.lastX) ?
document.body.scrollLeft+3:
(event.screenX ==
document.lastX) ?
document.body.scrollLeft:document.body.scrollLeft-3;
document.body.scrollTop = (event.screenY > document.lastY) ?
document.body.scrollTop+3:
(event.screenY ==
document.lastY) ? document.body.scrollTop:document.body.scrollTop-3;
}
document.lastX = event.screenX;
document.lastY = event.screenY;
}
document.onmousedown=new Function('return false');
document.onmousemove=moveImage;
viewart.pl?lang=en&i=22 to scroll in the same direction one moves the
mouse. This works fine -except in IE- where the image tends to flicker
when the scrolling takes place.
Is there an alternative way to achieve the scrolling with out the
causing the flicker?
The code is as follows:
function moveImage(event)
{
if(!event) event = window.event;
if(document.lastX!=null&&document.lastY!=null) {
document.body.scrollLeft = (event.screenX > document.lastX) ?
document.body.scrollLeft+3:
(event.screenX ==
document.lastX) ?
document.body.scrollLeft:document.body.scrollLeft-3;
document.body.scrollTop = (event.screenY > document.lastY) ?
document.body.scrollTop+3:
(event.screenY ==
document.lastY) ? document.body.scrollTop:document.body.scrollTop-3;
}
document.lastX = event.screenX;
document.lastY = event.screenY;
}
document.onmousedown=new Function('return false');
document.onmousemove=moveImage;