home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global ScrollVec, current, NumHits, CompVec
- set hlArrow to the clickOn + 20
- set the visible of sprite hlArrow to 1
- updateStage()
- set QueryFieldVec to ["alco", "non-alco", "other", "total"]
- set x to (the clickOn / 2) - 4
- set currField to getAt(QueryFieldVec, x)
- set currScroll to getAt(ScrollVec, x)
- set MaxLines to the number of lines in field currField
- if currField = "total" then
- repeat with i = 18 to 25
- set the visible of sprite i to 0
- end repeat
- repeat while the mouseDown
- if current = 0 then
- if currScroll < (MaxLines - 7) then
- set currScroll to currScroll + 1
- set the text of field ("query-" & currField) to line currScroll to currScroll + 8 of field "abc"
- end if
- else
- set MaxLines to count(current)
- if currScroll < (MaxLines - 7) then
- set currScroll to currScroll + 1
- repeat with i = 1 to 8
- set totalLine to getAt(current, currScroll + i - 1)
- put line totalLine of field "names" into line i of field "total"
- end repeat
- set the text of field ("query-" & currField) to the text of field currField
- end if
- end if
- setAt(ScrollVec, x, currScroll)
- end repeat
- set hitChannels to NumHits - currScroll + 1
- if hitChannels > 8 then
- set hitChannels to 8
- end if
- repeat with i = 1 to hitChannels
- set the visible of sprite (i + 17) to 1
- end repeat
- else
- repeat while the mouseDown
- if currScroll < (MaxLines - 4) then
- set currScroll to currScroll + 1
- set the text of field ("query-" & currField) to line currScroll to currScroll + 4 of field currField
- repeat with i = 1 to 5
- set lineChecked to currField & currScroll + i - 1
- if getPos(CompVec, lineChecked) = 0 then
- set the foreColor of line i of field ("query-" & currField) to 204
- next repeat
- end if
- set the foreColor of line i of field ("query-" & currField) to 35
- end repeat
- end if
- setAt(ScrollVec, x, currScroll)
- end repeat
- end if
- set the visible of sprite hlArrow to 0
- end
-