home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / Internal_27.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  2.0 KB  |  59 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.   if currField = "total" then
  11.     repeat with i = 18 to 25
  12.       set the visible of sprite i to 0
  13.     end repeat
  14.     repeat while the mouseDown
  15.       if current = 0 then
  16.         if currScroll > 1 then
  17.           set currScroll to currScroll - 1
  18.           set the text of field ("query-" & currField) to line currScroll to currScroll + 8 of field "abc"
  19.         end if
  20.         next repeat
  21.       end if
  22.       set MaxLines to count(current)
  23.       if currScroll > 1 then
  24.         set currScroll to currScroll - 1
  25.         repeat with i = 1 to 9
  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 repeat
  32.     set hitChannels to NumHits - currScroll + 1
  33.     if hitChannels > 8 then
  34.       set hitChannels to 8
  35.     end if
  36.     repeat with i = 1 to hitChannels
  37.       set the visible of sprite (i + 17) to 1
  38.     end repeat
  39.     setAt(ScrollVec, x, currScroll)
  40.   else
  41.     repeat while the mouseDown
  42.       if currScroll > 1 then
  43.         set currScroll to currScroll - 1
  44.         set the text of field ("query-" & currField) to line currScroll to currScroll + 4 of field currField
  45.         repeat with i = 1 to 5
  46.           set lineChecked to currField & currScroll + i - 1
  47.           if getPos(CompVec, lineChecked) = 0 then
  48.             set the foreColor of line i of field ("query-" & currField) to 204
  49.             next repeat
  50.           end if
  51.           set the foreColor of line i of field ("query-" & currField) to 35
  52.         end repeat
  53.       end if
  54.       setAt(ScrollVec, x, currScroll)
  55.     end repeat
  56.   end if
  57.   set the visible of sprite hlArrow to 0
  58. end
  59.