home *** CD-ROM | disk | FTP | other *** search
/ PC Play 1 / PCPLAY1.ISO / intro.dxr / 00008_InfoTextObj.ls < prev    next >
Encoding:
Text File  |  1996-08-29  |  861 b   |  41 lines

  1. property ancestor, spr, curText, castList, languageTimer
  2.  
  3. on new me, s, inRate
  4.   set the ancestor of me to new(script "BlinkTextObj", s, inRate)
  5.   set spr to s
  6.   set c to the number of member "ShootText"
  7.   set castList to [c, c + 1, c + 2]
  8.   set curText to 1
  9.   set languageRate to 5
  10.   puppetSprite(spr, 1)
  11.   return me
  12. end
  13.  
  14. on play me
  15.   if languageTimer > 0 then
  16.     if the blinkTimer of me = 1 then
  17.       set languageTimer to languageTimer - 1
  18.     end if
  19.   else
  20.     if not (the visible of sprite the spr of me) then
  21.       set languageTimer to 5
  22.       SetText(me)
  23.     end if
  24.   end if
  25.   play(ancestor)
  26. end
  27.  
  28. on SetText me, inString
  29.   if curText = 3 then
  30.     set curText to 1
  31.   else
  32.     set curText to curText + 1
  33.   end if
  34.   set the memberNum of sprite spr to getAt(castList, curText)
  35. end
  36.  
  37. on Dispose
  38.   puppetSprite(spr, 0)
  39.   set the visible of sprite spr to 1
  40. end
  41.