home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global loValPos, hiValPos, scrRange, displayLines, menuText, offsetPtr, tempText
- set me to the clickOn
- if the castType of cast the castNum of sprite me = #text then
- set the editableText of me to 1
- end if
- set totLines to the number of lines in menuText
- set the immediate of sprite me to 1
- if the locH of sprite me < 1000 then
- set offset to the locV of sprite me - the mouseV
- set oldOffsetPtr to offsetPtr
- repeat while the mouseDown
- set x to the mouseV + offset
- set the visible of sprite me to 0
- if x < loValPos then
- set the locV of sprite me to loValPos
- set offsetPtr to 0
- else
- if x > hiValPos then
- set the locV of sprite me to hiValPos
- set offsetPtr to totLines - displayLines - 1.0
- else
- set the locV of sprite me to x
- set offsetPtr to integer((totLines - displayLines - 0.5) * (x - loValPos) / scrRange)
- end if
- end if
- set the visible of sprite me to 1
- set tempText to line offsetPtr + 1 to offsetPtr + displayLines of menuText
- put tempText into field 441
- if the locH of sprite 48 < 1000 then
- set theLocV to the locV of sprite 48
- set the visible of sprite 48 to 0
- set theLocV to theLocV + ((offsetPtr - oldOffsetPtr) * the textHeight of field 441)
- set the locV of sprite 48 to theLocV
- if (theLocV < the bottom of sprite 39) and (theLocV >= the top of sprite 39) then
- set the visible of sprite 48 to 1
- end if
- end if
- updateStage()
- set oldOffsetPtr to offsetPtr
- end repeat
- end if
- end
-