More send in time

Ken Norris pixelbird at interisland.net
Tue Jul 1 11:52:01 EDT 2003


OK gang,

Here's version 2 of the card script, with Scott's idea to eliminate mouse
polling, and Cubist's 'mod' idea (with alterations) implemented (thanks,
fellers):

on mouseDown
  set the uAllowScroll of me to true
  endlessScroller
end mouseDown

on endlessScroller
   constant scrollSpeedInterval = 10
   if not the uAllowScroll of me then exit endlessScroller
     if within(graphic "upScrollArea", mouseLoc()) then
    set the vScroll of fld 1 to ((the vScroll of fld 1) + 1344) mod 1345
  else if within(graphic "downScrollArea", mouseLoc()) then
    set the vScroll of fld 1 to ((the vScroll of fld 1) + 1345) mod 1344
  end if
   --if within(graphic "upScrollArea", mouseLoc()) then
     --f the vScroll of fld 1 = 0 then set the vScroll of fld 1 to 1345 --
wrapover
     --set the vScroll of fld 1 to (the vScroll of fld 1) - 1
   --else if within(graphic "downScrollArea", mouseLoc()) then
     --if the vScroll of fld 1 „ 1345 then set the vScroll of fld 1 to 0
--wrapover
     --set the vScroll of fld 1 to (the vScroll of fld 1) + 1
   --end if
   send "endlessScroller" to me in scrollSpeedInterval milliseconds
end endlessScroller

on mouseUp
   set the uAllowScroll of me to false
end mouseUp

on mouseRelease
   mouseUp
end mouseRelease

...I don't see how it can get any more efficient, but anyone is welcome to
take a shot.

Next, I'll be adding the selection routines, also based on former HC stuff.

Thanks again,
Ken N.




More information about the use-livecode mailing list