I am trying to let my window scroll continuously while I am pointing a picture with my mouse (arrows, one up and one down).
What happens is if I point either one of the pictures, the window keeps scrolling till the end without scrolling, even if my mouse is at an other place by then...
here is my code:
What the hell am I doing wrong!!
pleazzz help me!
greetz
Mim
What happens is if I point either one of the pictures, the window keeps scrolling till the end without scrolling, even if my mouse is at an other place by then...
here is my code:
Code:
//this function is called in the mouseover event of my UpArrow picture
function ScrollUpArrow ()
{
BoolScroll = true;
OutMouse = false;
while (BoolScroll == true)
{document.frames["HelmenIFrame"].window.scrollBy(0,1);
window.setTimeout("ScrollEnd()",10);
}
}
//this functino is called in the mouseover event of my DownArrow picture
function scrollDownArrow()
{
BoolScroll = true;
OutMouse = false;
while (BoolScroll == true)
{document.frames["HelmenIFrame"].window.scrollBy(0,-1);
window.setTimeout("ScrollEnd()",10);
}
}
//This function is called in the MouseOut event of both pictures
function MouseScrollEnd()
{OutMouse = true;}
function ScrollEnd()
{
if (OutMouse == true)
BoolScroll = false;
}
What the hell am I doing wrong!!
pleazzz help me!
greetz
Mim