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@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.


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to