More send in time

Ken Norris pixelbird at interisland.net
Tue Jul 1 01:19:00 EDT 2003


Helloah,

First I want to thank eveyone for the help with 'send in time'.

I took the basic premise I started from, then sliced off bits and pieces of
the posted scripts, reassembled them, refactored and hopefully reduced it.

What I came up with is this base to work from. It works great and seems very
stable. It's a scrolling field with upper and lower sections covered by
translucent graphics and an open box across the center (where the eventual
selection will take place). It has a few repeated lines at the head and tail
such that it smooth-scrolls endlessly in either direction.

(Currently) In a card script:

on mouseDown
   endlessScroller
end mouseDown

on endlessScroller
   constant scrollSpeedInterval = 10 -- will be a global later
   if the mouse is up then exit endlessScroller
   if within(graphic "upScrollArea", mouseLoc()) then
     -- wrapover:
     if the vScroll of fld 1 = 0 then set the vScroll of fld 1 to 1345
     set the vScroll of fld 1 to (the vScroll of fld 1) - 1
   else if within(graphic "downScrollArea", mouseLoc()) then
     -- wrapover:
     if the vScroll of fld 1 „ 1345 then set the vScroll of fld 1 to 0
     set the vScroll of fld 1 to (the vScroll of fld 1) + 1
   end if
   send "endlessScroller" to me in scrollSpeedInterval milliseconds
end endlessScroller






More information about the use-livecode mailing list