Momentum Scrolling Script
Scott Rossi
scott at tactilemedia.com
Wed Jun 28 15:00:49 EDT 2017
Hi Jonathan:
Just doing some simple tests, your script is great. Thanks for sharing it on the list.
Two minor improvements I would suggest:
1) After the mouseUp handler, add a mouseRelease handler to trigger deceleration/stop when the mouse is released outside of the target control.
on mouseRelease
mouseUp
end mouseRelease
2) In the mouseMove handler, use the built-in parameters provided by the handler instead of reading the mouseV. Probably not a huge deal in the scheme of things, but might add a tiny bit more efficiency to the script.
on mouseMove X,Y
if allowDrag <> empty then
set the vScroll of me to (allowDrag-Y)
end if
end mouseMove
Regards,
Scott Rossi
Creative Director
Tactile Media, UX/UI Design
> On Jun 28, 2017, at 9:05 AM, Jonathan Lynch via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> I just created and tested a momentum scrolling script on my iPhone, and it
> appears to work quite well, so I thought I would share it here.
More information about the use-livecode
mailing list