<HTML><FONT FACE=arial,helvetica><FONT SIZE=2>I used a procedure similar to this once but instead of:<BR>
<BR>
repeat until the mouse is up<BR>
<BR>
I used:<BR>
<BR>
repeat while the mouse is down<BR>
<BR>
I do not recall ever experiencing a problem with it not stopping to scroll. You might try that just to see if it makes a difference. <BR>
<BR>
Philip Chumbley<BR>
<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=CITE style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">Hi list,<BR>
<BR>
First I want to point out that I've read the archives<BR>
and am aware of Scott's advice to not use a repeat<BR>
loop inside a mousedown handler, but to use<BR>
mousemove / mouserelease instead.<BR>
<BR>
However, I'm facing a problem for which using<BR>
a repeat loop inside a mousedown seems to be the<BR>
only solution, and of course I met the problem of<BR>
the mouseup event not being trapped by my script.<BR>
<BR>
In a few words, when the mouse is down on an image<BR>
(very large one, like a panoramic) the image is supposed<BR>
to scroll back & forth horizontally according to the position<BR>
of the mouse relative to the loc of that image, the scroll speed<BR>
being proportional to the distance between the mouseloc and<BR>
the loc of the image (actually like in a QTVR).<BR>
So I used the following script :<BR>
<BR>
on mousedown<BR>
repeat until the mouse is up<BR>
show img 1 at max(-633,min(1432,(item 1 of loc of img<BR>
1)-(trunc(((item<BR>
1 of the mouseloc)-400)/10)))),300<BR>
end repeat<BR>
end mousedown<BR>
<BR>
It works great (very smooth scrolling), except that the up<BR>
position of the mouse isn't recognized about 15% of the<BR>
time, and the img keeps scrolling even when the mouse btn<BR>
has been released.<BR>
It is obvious that I can't use mousemove, since the image must<BR>
keep scrolling even when the mouse isn't moving, as long<BR>
as it is down.<BR>
<BR>
I tried to use mousestilldown (which is a loop by itself) :<BR>
<BR>
on mousestilldown<BR>
show img 1 at max(-633,min(1432,(item 1 of loc of img<BR>
1)-(trunc(((item<BR>
1 of the mouseloc)-400)/10)))),300<BR>
end mousestilldown<BR>
<BR>
It works (the release of the mouse btn is always detected),<BR>
although the scrolling effect isn't smooth at all...<BR>
<BR>
If anyone has a brilliant idea for a possible solution,<BR>
I thank him / her in advance...<BR>
<BR>
JB<BR>
</BLOCKQUOTE><BR>
<BR>
</FONT></HTML>