home *** CD-ROM | disk | FTP | other *** search
- on initCredits
- global creditSpr, creditCast, creditHeight, kStageRect
- set creditSpr to 19
- set creditCast to the castNum of sprite creditSpr
- set creditRect to the rect of sprite creditSpr
- set creditHeight to getAt(creditRect, 4) - getAt(creditRect, 2)
- puppetSprite(creditSpr, 1)
- doTitleFade()
- doCreditScroll()
- end
-
- on doCreditScroll
- global creditSpr, creditCast, creditHeight, kStageRect, gCredits
- if gCredits = EMPTY then
- exit
- end if
- set defaultCredits to RETURN & "PUT" & RETURN & RETURN & "YOUR" & RETURN & RETURN & "CREDITS" & RETURN & RETURN & "HERE"
- if gCredits = defaultCredits then
- exit
- end if
- set the text of field "creditScreenField" to gCredits
- set the textSize of field "creditScreenField" to 24
- set the foreColor of cast creditCast to 9
- set stageT to getAt(kStageRect, 2)
- set stageB to getAt(kStageRect, 4) - 250
- set the locV of sprite creditSpr to stageB
- updateStage()
- set now to the timer
- repeat while the timer < (now + 60)
- nothing()
- if the mouseDown then
- set the locV of sprite creditSpr to -1000
- updateStage()
- exit
- end if
- end repeat
- set limit to stageT - creditHeight
- repeat while the locV of sprite creditSpr > limit
- set the locV of sprite creditSpr to the locV of sprite creditSpr - 3
- updateStage()
- if the mouseDown then
- exit repeat
- end if
- end repeat
- set the locV of sprite creditSpr to -1000
- updateStage()
- end
-
- on doTitleFade
- global creditSpr, creditCast, creditHeight, kStageRect, gCurrTitle
- set the text of field "creditScreenField" to gCurrTitle
- set the textSize of field "creditScreenField" to 36
- set stageT to getAt(kStageRect, 2)
- set stageB to getAt(kStageRect, 4)
- set stageHeight to stageB - stageT
- set orgV to stageT + ((stageHeight - creditHeight) / 2)
- puppetSprite(creditSpr, 1)
- set the locV of sprite creditSpr to orgV
- set col to 255
- repeat with col = 255 down to 245
- set the foreColor of cast creditCast to col
- updateStage()
- end repeat
- set titleTime to 60 + (length(gCurrTitle) * 5)
- set freeze to the timer
- repeat while the timer < (freeze + titleTime)
- if the mouseDown then
- exit repeat
- end if
- end repeat
- repeat with col = 245 to 255
- set the foreColor of cast creditCast to col
- updateStage()
- end repeat
- set the locV of sprite creditSpr to -1000
- updateStage()
- end
-