home *** CD-ROM | disk | FTP | other *** search
- on setUpSprites range, trueORfalse, theImm
- if string(trueORfalse) = EMPTY then
- set trueORfalse to 0
- end if
- set range to convertToList(range)
- if range = EMPTY then
- exit
- end if
- set x to the number of items in range
- repeat with n = 1 to x
- puppetSprite(value(item n of range), trueORfalse)
- if trueORfalse = 1 then
- set the immediate of sprite value(item n of range) to theImm
- end if
- end repeat
- end
-
- on errMsg theString
- end
-
- on removeComments textCast
- set x to the number of lines in textCast
- repeat with n = 1 to x
- if line x - n + 1 of textCast contains "--" then
- delete line x - n + 1 of textCast
- end if
- end repeat
- return textCast
- end
-
- on manageHiliter refSprite, offset, txtSprite, fieldNum
- global linePtr, theMenu
- set LT to the left of sprite txtSprite
- if theMenu = "index" then
- set wd to the width of sprite txtSprite
- else
- set wd to the width of sprite refSprite - offset
- end if
- set TP to the top of sprite txtSprite
- set theLines to the number of lines in field fieldNum
- set txtHt to the textHeight of field fieldNum
- puppetSprite(48, 1)
- set the castNum of sprite 48 to 414
- set the locH of sprite 48 to LT
- set the width of sprite 48 to wd
- set the height of sprite 48 to txtHt + 1
- set oldLine to EMPTY
- set the visible of sprite 48 to 0
- repeat while the mouseDown
- set vPos to the mouseV
- if (the mouseH < LT) or (the mouseH > (LT + wd)) then
- next repeat
- end if
- if (vPos < TP) or (vPos > (TP + (txtHt * theLines))) then
- next repeat
- end if
- set linePtr to integer((vPos - TP) / txtHt)
- if linePtr < 0 then
- set linePtr to 0
- end if
- if linePtr > theLines then
- set linePtr to theLines
- end if
- set the visible of sprite 48 to 0
- set the locV of sprite 48 to TP + (linePtr * txtHt)
- set the visible of sprite 48 to 1
- updateStage()
- end repeat
- end
-
- on manageHiliter2 txtSprite, fieldNum, adjustWd
- global linePtr, theMenu, displayLines, theClickLine
- set LT to the left of sprite txtSprite
- set TP to the top of sprite txtSprite
- set wd to the width of sprite txtSprite + adjustWd
- set theLines to the number of lines in field fieldNum
- set txtHt to the textHeight of field fieldNum
- puppetSprite(48, 1)
- set the castNum of sprite 48 to 414
- set the width of sprite 48 to wd
- set the height of sprite 48 to txtHt + 1
- set the visible of sprite 48 to 0
- set oldLine to EMPTY
- repeat while the mouseDown
- set vPos to the mouseV
- if (the mouseH < LT) or (the mouseH > (LT + wd)) then
- next repeat
- end if
- if (vPos < TP) or (vPos > (TP + (txtHt * theLines))) then
- next repeat
- end if
- set linePtr to integer((vPos - TP) / txtHt)
- if linePtr < 0 then
- set linePtr to 0
- end if
- if linePtr > theLines then
- set linePtr to theLines
- end if
- set the locH of sprite 48 to LT + 1000
- set the visible of sprite 48 to 0
- set the locV of sprite 48 to TP + (linePtr * txtHt)
- set the locH of sprite 48 to LT
- set the visible of sprite 48 to 1
- updateStage()
- end repeat
- if (the mouseH >= LT) or (the mouseH <= (LT + wd)) then
- if (vPos >= TP) or (vPos <= (TP + (txtHt * theLines))) then
- set the visible of sprite 48 to 1
- else
- set the locH of sprite 48 to LT + 1000
- set the visible of sprite 48 to 0
- end if
- else
- set the locH of sprite 48 to LT + 1000
- set the visible of sprite 48 to 0
- end if
- end
-