home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / Internal_28.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  2.1 KB  |  60 lines

  1. on mouseDown
  2.   global ScrollVec, current, NumHits, CompVec
  3.   set hlArrow to the clickOn + 20
  4.   set the visible of sprite hlArrow to 1
  5.   updateStage()
  6.   set QueryFieldVec to ["alco", "non-alco", "other", "total"]
  7.   set x to (the clickOn / 2) - 4
  8.   set currField to getAt(QueryFieldVec, x)
  9.   set currScroll to getAt(ScrollVec, x)
  10.   set MaxLines to the number of lines in field currField
  11.   if currField = "total" then
  12.     repeat with i = 18 to 25
  13.       set the visible of sprite i to 0
  14.     end repeat
  15.     repeat while the mouseDown
  16.       if current = 0 then
  17.         if currScroll < (MaxLines - 7) then
  18.           set currScroll to currScroll + 1
  19.           set the text of field ("query-" & currField) to line currScroll to currScroll + 8 of field "abc"
  20.         end if
  21.       else
  22.         set MaxLines to count(current)
  23.         if currScroll < (MaxLines - 7) then
  24.           set currScroll to currScroll + 1
  25.           repeat with i = 1 to 8
  26.             set totalLine to getAt(current, currScroll + i - 1)
  27.             put line totalLine of field "names" into line i of field "total"
  28.           end repeat
  29.           set the text of field ("query-" & currField) to the text of field currField
  30.         end if
  31.       end if
  32.       setAt(ScrollVec, x, currScroll)
  33.     end repeat
  34.     set hitChannels to NumHits - currScroll + 1
  35.     if hitChannels > 8 then
  36.       set hitChannels to 8
  37.     end if
  38.     repeat with i = 1 to hitChannels
  39.       set the visible of sprite (i + 17) to 1
  40.     end repeat
  41.   else
  42.     repeat while the mouseDown
  43.       if currScroll < (MaxLines - 4) then
  44.         set currScroll to currScroll + 1
  45.         set the text of field ("query-" & currField) to line currScroll to currScroll + 4 of field currField
  46.         repeat with i = 1 to 5
  47.           set lineChecked to currField & currScroll + i - 1
  48.           if getPos(CompVec, lineChecked) = 0 then
  49.             set the foreColor of line i of field ("query-" & currField) to 204
  50.             next repeat
  51.           end if
  52.           set the foreColor of line i of field ("query-" & currField) to 35
  53.         end repeat
  54.       end if
  55.       setAt(ScrollVec, x, currScroll)
  56.     end repeat
  57.   end if
  58.   set the visible of sprite hlArrow to 0
  59. end
  60.