home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / 00027_Script_27 < prev    next >
Text File  |  1997-03-05  |  2KB  |  64 lines

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