home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- sound stop 2
- cursor([402, 403])
- set the cursor of sprite 22 to [404, 405]
- set the cursor of sprite 15 to [404, 405]
- set the cursor of sprite 18 to [404, 405]
- loadTitle()
- init()
- end
-
- on loadTitle
- set the puppet of sprite 24 to 1
- set the castNum of sprite 24 to the number of cast string("sub-" & Get_ScreenSubject())
- updateStage()
- end
-
- on init
- Set_MaxLines(10)
- Set_WhichText(field ("LIST" & Get_ScreenSubject()))
- Set_FieldScroll(the number of cast "currScroll")
- Set_NumOflines(the number of lines in Get_WhichText())
- set the textHeight of field Get_FieldScroll() to 14
- Set_SliderSprite(10)
- Set_ThumbSprite(11)
- Set_CurrPlace(0)
- Set_ConstraintSprite(14)
- Set_DisableSprite(18)
- Set_HiliteSprite(20)
- Set_SizeOfLine(14)
- Set_TopField(the top of sprite 15)
- Set_SelectedLine(EMPTY)
- puppetSprite(Get_HiliteSprite(), 1)
- puppetSprite(Get_ThumbSprite(), 1)
- set the immediate of sprite Get_ThumbSprite() to 1
- Set_SliderHeight(the height of sprite Get_ConstraintSprite())
- Set_Options(Get_NumOflines() - Get_MaxLines())
- set the visible of sprite Get_DisableSprite() to not (Get_Options() > 0)
- if Get_Options() > 0 then
- Set_Increment(1.0 * Get_SliderHeight() / Get_Options())
- else
- set the cursor of sprite 18 to [400, 401]
- end if
- Set_TopLoc(the top of sprite Get_ConstraintSprite())
- PlaceSlider()
- end
-
- on ChooseLine
- set TopLoc to Get_TopField()
- set VerticalLoc to getAt(the clickLoc, 2)
- set NumOfline to (VerticalLoc - TopLoc) / Get_SizeOfLine()
- if (NumOfline + 1) <= Get_NumOflines() then
- set newLoc to (NumOfline * Get_SizeOfLine()) + TopLoc
- set the locV of sprite Get_HiliteSprite() to newLoc
- Set_SelectedLine(Get_CurrPlace() + NumOfline + 1)
- updateStage()
- tell the stage
- openSubMenuWindow()
- end tell
- end if
- end
-
- on UpdateHilight
- if (Get_SelectedLine() <> EMPTY) and (Get_SelectedLine() > Get_CurrPlace()) and ((Get_SelectedLine() - 1) < (Get_CurrPlace() + Get_MaxLines())) then
- set TopLoc to Get_TopField()
- set newLoc to ((Get_SelectedLine() - Get_CurrPlace() - 1) * Get_SizeOfLine()) + TopLoc
- set the locV of sprite Get_HiliteSprite() to newLoc
- else
- set the locV of sprite Get_HiliteSprite() to 999
- end if
- updateStage()
- end
-
- on SliderActive
- repeat while the stillDown
- if rollOver(16) then
- set newV to constrainV(Get_ConstraintSprite(), mouseV())
- set the locV of sprite Get_ThumbSprite() to newV
- set newValue to integer((newV - Get_TopLoc()) / Get_Increment())
- Set_CurrPlace(newValue)
- UpdateHilight()
- put line Get_CurrPlace() + 1 to Get_CurrPlace() + Get_MaxLines() of Get_WhichText() into field Get_FieldScroll()
- end if
- end repeat
- end
-
- on PlaceSlider
- set currentValue to Get_CurrPlace()
- if Get_Options() > 0 then
- set newPlace to Get_TopLoc() + integer(Get_Increment() * currentValue)
- set the locV of sprite Get_ThumbSprite() to newPlace
- updateStage()
- end if
- UpdateHilight()
- put line Get_CurrPlace() + 1 to Get_CurrPlace() + Get_MaxLines() of Get_WhichText() into field Get_FieldScroll()
- end
-
- on ClickSlider toSub
- if not toSub then
- Set_CurrPlace(Get_CurrPlace() - Get_MaxLines() + 1)
- else
- Set_CurrPlace(Get_CurrPlace() + Get_MaxLines() - 1)
- end if
- if Get_CurrPlace() < 0 then
- Set_CurrPlace(0)
- else
- if (Get_CurrPlace() + Get_MaxLines()) > Get_NumOflines() then
- Set_CurrPlace(Get_NumOflines() - Get_MaxLines())
- end if
- end if
- PlaceSlider()
- end
-
- on Set_StepMeter direction
- set currentValue to Get_CurrPlace()
- if (direction = "increase") and (currentValue <> Get_Options()) then
- Set_CurrPlace(currentValue + 1)
- else
- if (direction = "decrease") and (currentValue <> 0) then
- Set_CurrPlace(currentValue - 1)
- end if
- end if
- PlaceSlider()
- end
-
- on Set_SliderSprite int
- global SliderSprite
- set SliderSprite to int
- end
-
- on Get_SliderSprite
- global SliderSprite
- return SliderSprite
- end
-
- on Set_ThumbSprite int
- global ThumbSprite
- set ThumbSprite to int
- end
-
- on Get_ThumbSprite
- global ThumbSprite
- return ThumbSprite
- end
-
- on Set_CurrPlace int
- global CurrPlace
- set CurrPlace to int
- end
-
- on Get_CurrPlace
- global CurrPlace
- return CurrPlace
- end
-
- on Set_SliderHeight int
- global SliderHeight
- set SliderHeight to int
- end
-
- on Get_SliderHeight
- global SliderHeight
- return SliderHeight
- end
-
- on Set_Increment int
- global Increment
- set Increment to int
- end
-
- on Get_Increment
- global Increment
- return Increment
- end
-
- on Set_TopLoc int
- global TopLoc
- set TopLoc to int
- end
-
- on Get_TopLoc
- global TopLoc
- return TopLoc
- end
-
- on Set_Options int
- global options
- set options to int
- end
-
- on Get_Options
- global options
- return options
- end
-
- on Set_MaxLines int
- global MaxLines
- set MaxLines to int
- end
-
- on Get_MaxLines
- global MaxLines
- return MaxLines
- end
-
- on Set_WhichText str
- global WhichText
- set WhichText to str
- end
-
- on Get_WhichText
- global WhichText
- return WhichText
- end
-
- on Set_FieldScroll int
- global FieldScroll
- set FieldScroll to int
- end
-
- on Get_FieldScroll
- global FieldScroll
- return FieldScroll
- end
-
- on Set_NumOflines int
- global numOfLines
- set numOfLines to int
- end
-
- on Get_NumOflines
- global numOfLines
- return numOfLines
- end
-
- on Set_ConstraintSprite int
- global ConstraintSprite
- set ConstraintSprite to int
- end
-
- on Get_ConstraintSprite
- global ConstraintSprite
- return ConstraintSprite
- end
-
- on Set_DisableSprite int
- global DisableSprite
- set DisableSprite to int
- end
-
- on Get_DisableSprite
- global DisableSprite
- return DisableSprite
- end
-
- on Set_HiliteSprite int
- global HiliteSprite
- set HiliteSprite to int
- end
-
- on Get_HiliteSprite
- global HiliteSprite
- return HiliteSprite
- end
-
- on Set_SizeOfLine int
- global SizeOfLine
- set SizeOfLine to int
- end
-
- on Get_SizeOfLine
- global SizeOfLine
- return SizeOfLine
- end
-
- on Set_SelectedLine int
- global SelectedLine
- set SelectedLine to int
- end
-
- on Get_SelectedLine
- global SelectedLine
- return SelectedLine
- end
-
- on Set_TopField int
- global TopField
- set TopField to int
- end
-
- on Get_TopField
- global TopField
- return TopField
- end
-