YvonneTsang
Programmer
I am having some problems with the wheel mouse and my document.onscroll. I have an image that I want to keep on the middle of the page(an arrow and some stuff). I use the document onscroll to move the image and the appropriate onclick event for it. The problem that occurs for me now is that when I have drop down boxes, they become distorted when I use the wheel mouse. it works fine if you use the scroll bar which is what has me so confused. Can someone out there help me??
if (document.body.offsetWidth>hud_center+ 75 )
hud_x = document.body.scrollLeft + (document.body.offsetWidth+hud_center)/2 - hud_width + 16;
else
hud_x = document.body.scrollLeft + document.body.offsetWidth - hud_width - 25;
//hud_y = document.body.offsetHeight + document.body.scrollTop - hud_height - 40;
hud_y = document.body.offsetHeight/2 + document.body.scrollTop + 40;
hud.style.left = hud_x;
hud.style.top = hud_y;
if (document.body.offsetWidth>hud_center+ 75 )
hud_x = document.body.scrollLeft + (document.body.offsetWidth+hud_center)/2 - hud_width + 16;
else
hud_x = document.body.scrollLeft + document.body.offsetWidth - hud_width - 25;
//hud_y = document.body.offsetHeight + document.body.scrollTop - hud_height - 40;
hud_y = document.body.offsetHeight/2 + document.body.scrollTop + 40;
hud.style.left = hud_x;
hud.style.top = hud_y;