home *** CD-ROM | disk | FTP | other *** search
/ Reflux 1: The Becoming / Reflux.iso / shared.dxr / 00466.ls < prev    next >
Encoding:
Text File  |  1995-05-01  |  2.1 KB  |  86 lines

  1. on animate snd, chan, startCast, castCnt, fps, pic
  2.   puppetSprite(chan, 1)
  3.   if snd <> EMPTY then
  4.     puppetSound(snd)
  5.   end if
  6.   set nTicks to 60 / fps
  7.   set first to the number of cast startCast
  8.   set last to the number of cast startCast + abs(castCnt) - 1
  9.   if castCnt >= 0 then
  10.     repeat with n = first to last
  11.       set start to the ticks
  12.       set the castNum of sprite chan to n
  13.       updateStage()
  14.       repeat while (the ticks - start) < nTicks
  15.       end repeat
  16.     end repeat
  17.   else
  18.     repeat with n = last down to first
  19.       set start to the ticks
  20.       set the castNum of sprite chan to n
  21.       updateStage()
  22.       repeat while (the ticks - start) < nTicks
  23.       end repeat
  24.     end repeat
  25.   end if
  26.   if pic <> EMPTY then
  27.     set the castNum of sprite chan to the number of cast pic
  28.     updateStage()
  29.   end if
  30. end
  31.  
  32. on buttonPress snd, chan, onCast, offCast
  33.   if snd <> EMPTY then
  34.     puppetSound(snd)
  35.   end if
  36.   puppetSprite(chan, 1)
  37.   set the castNum of sprite chan to the number of cast onCast
  38.   updateStage()
  39.   repeat while the mouseDown
  40.   end repeat
  41.   set the castNum of sprite chan to the number of cast offCast
  42.   updateStage()
  43. end
  44.  
  45. on delay cnt
  46.   set start to the ticks
  47.   repeat while (the ticks - start) < cnt
  48.   end repeat
  49. end
  50.  
  51. on frankflash
  52.   global gPerspective
  53.   if gPerspective = 1 then
  54.     puppetSprite(10, 1)
  55.     set the castNum of sprite 4 to the number of cast "frankflash"
  56.     updateStage()
  57.     delay(5)
  58.     set the castNum of sprite 4 to the number of cast "FFOLBMP"
  59.     puppetSprite(10, 0)
  60.   end if
  61. end
  62.  
  63. on idflash
  64.   global gPerspective
  65.   if gPerspective = 2 then
  66.     puppetSprite(10, 1)
  67.     set the castNum of sprite 4 to the number of cast "idflash"
  68.     updateStage()
  69.     delay(5)
  70.     set the castNum of sprite 4 to the number of cast "JFOLDER1.BMP"
  71.     puppetSprite(10, 0)
  72.   end if
  73. end
  74.  
  75. on roarkflash
  76.   global gPerspective
  77.   if gPerspective = 3 then
  78.     puppetSprite(10, 1)
  79.     set the castNum of sprite 4 to the number of cast "roarkflash"
  80.     updateStage()
  81.     delay(5)
  82.     set the castNum of sprite 4 to the number of cast "rFOLDER1.BMP"
  83.     puppetSprite(10, 0)
  84.   end if
  85. end
  86.