home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / devglry / bigtop / shockwav / 27_pollu.dcr / 00113.ls < prev    next >
Encoding:
Text File  |  1996-04-10  |  2.3 KB  |  78 lines

  1. on initCredits
  2.   global creditSpr, creditCast, creditHeight, kStageRect
  3.   set creditSpr to 19
  4.   set creditCast to the castNum of sprite creditSpr
  5.   set creditRect to the rect of sprite creditSpr
  6.   set creditHeight to getAt(creditRect, 4) - getAt(creditRect, 2)
  7.   puppetSprite(creditSpr, 1)
  8.   doTitleFade()
  9.   doCreditScroll()
  10. end
  11.  
  12. on doCreditScroll
  13.   global creditSpr, creditCast, creditHeight, kStageRect, gCredits
  14.   if gCredits = EMPTY then
  15.     exit
  16.   end if
  17.   set defaultCredits to RETURN & "PUT" & RETURN & RETURN & "YOUR" & RETURN & RETURN & "CREDITS" & RETURN & RETURN & "HERE"
  18.   if gCredits = defaultCredits then
  19.     exit
  20.   end if
  21.   set the text of field "creditScreenField" to gCredits
  22.   set the textSize of field "creditScreenField" to 24
  23.   set the foreColor of cast creditCast to 9
  24.   set stageT to getAt(kStageRect, 2)
  25.   set stageB to getAt(kStageRect, 4) - 250
  26.   set the locV of sprite creditSpr to stageB
  27.   updateStage()
  28.   set now to the timer
  29.   repeat while the timer < (now + 60)
  30.     nothing()
  31.     if the mouseDown then
  32.       set the locV of sprite creditSpr to -1000
  33.       updateStage()
  34.       exit
  35.     end if
  36.   end repeat
  37.   set limit to stageT - creditHeight
  38.   repeat while the locV of sprite creditSpr > limit
  39.     set the locV of sprite creditSpr to the locV of sprite creditSpr - 3
  40.     updateStage()
  41.     if the mouseDown then
  42.       exit repeat
  43.     end if
  44.   end repeat
  45.   set the locV of sprite creditSpr to -1000
  46.   updateStage()
  47. end
  48.  
  49. on doTitleFade
  50.   global creditSpr, creditCast, creditHeight, kStageRect, gCurrTitle
  51.   set the text of field "creditScreenField" to gCurrTitle
  52.   set the textSize of field "creditScreenField" to 36
  53.   set stageT to getAt(kStageRect, 2)
  54.   set stageB to getAt(kStageRect, 4)
  55.   set stageHeight to stageB - stageT
  56.   set orgV to stageT + ((stageHeight - creditHeight) / 2)
  57.   puppetSprite(creditSpr, 1)
  58.   set the locV of sprite creditSpr to orgV
  59.   set col to 255
  60.   repeat with col = 255 down to 245
  61.     set the foreColor of cast creditCast to col
  62.     updateStage()
  63.   end repeat
  64.   set titleTime to 60 + (length(gCurrTitle) * 5)
  65.   set freeze to the timer
  66.   repeat while the timer < (freeze + titleTime)
  67.     if the mouseDown then
  68.       exit repeat
  69.     end if
  70.   end repeat
  71.   repeat with col = 245 to 255
  72.     set the foreColor of cast creditCast to col
  73.     updateStage()
  74.   end repeat
  75.   set the locV of sprite creditSpr to -1000
  76.   updateStage()
  77. end
  78.