home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / mac / Resources / audiosyncrasy / a_s_demo.dxr / 00019.ls < prev    next >
Encoding:
Text File  |  1996-03-16  |  2.4 KB  |  99 lines

  1. global gSprite, gOrigVolume, gCurrentVolume, gCurrentSong, gPrevSong, gOrigColor, gClickFlag, gRW
  2.  
  3. on startMovie
  4.   if not (the colorDepth) = 8 then
  5.     set gOrigColor to the colorDepth
  6.     set the colorDepth to 8
  7.   end if
  8.   set gOrigVolume to the soundLevel
  9.   set the soundLevel to 4
  10.   set gCurrentVolume to 4
  11.   set gSprite to 0
  12.   set gCurrentSong to " "
  13.   put " " into field "songText"
  14.   set gPrevSong to " "
  15.   preLoad(1, 110)
  16.   if not (the machineType = 256) then
  17.     initRearWindow()
  18.   end if
  19. end
  20.  
  21. on initRearWindow
  22.   if objectp(gRW) then
  23.     gRW(mdispose)
  24.   end if
  25.   openXLib(the pathName & "rearwindow.xobj")
  26.   set gRW to RearWindow(mnew, "M")
  27.   put gRW
  28.   gRW(mPatToWindow, -5)
  29. end
  30.  
  31. on stopSong
  32.   puppetSound(0)
  33.   sound stop 1
  34.   set the castNum of sprite gSprite to the number of cast "dim button"
  35.   set the castNum of sprite (gSprite + 10) to the number of cast (gCurrentSong & " Lo")
  36.   updateStage()
  37. end
  38.  
  39. on waitMusic howLong
  40.   if the timer < howLong then
  41.     go(the frame)
  42.   end if
  43. end
  44.  
  45. on playSong theSong
  46.   unLoad()
  47.   if soundBusy(1) then
  48.     stopSong()
  49.   end if
  50.   set gSprite to the clickOn
  51.   puppetSound("click")
  52.   set the castNum of sprite gSprite to the number of cast "hilite button"
  53.   updateStage()
  54.   set the locH of sprite gSprite to the locH of sprite gSprite + 1
  55.   set the locV of sprite gSprite to the locV of sprite gSprite + 1
  56.   updateStage()
  57.   set the castNum of sprite (gSprite + 10) to the number of cast (theSong & " Hi")
  58.   set gCurrentSong to theSong
  59.   repeat while soundBusy(1)
  60.   end repeat
  61.   put "now loading..." into field "songText"
  62.   puppetSound(theSong)
  63.   updateStage()
  64.   repeat while the stillDown
  65.     if rollOver(gSprite) = 0 then
  66.       exit
  67.     end if
  68.   end repeat
  69.   set the locH of sprite gSprite to the locH of sprite gSprite - 1
  70.   set the locV of sprite gSprite to the locV of sprite gSprite - 1
  71.   updateStage()
  72.   put the text of field (theSong & "Text") into field "songText"
  73.   go("play test")
  74. end
  75.  
  76. on turnOffSprite
  77.   set the castNum of sprite gSprite to the number of cast "dim button"
  78.   set the castNum of sprite (gSprite + 10) to the number of cast (gCurrentSong & " Lo")
  79.   updateStage()
  80. end
  81.  
  82. on stopIntro
  83.   sound fadeOut 1, 90
  84.   set gClickFlag to 1
  85.   go("endIntro")
  86. end
  87.  
  88. on stopMovie
  89.   if not (the machineType) = 256 then
  90.     if objectp(gRW) then
  91.       gRW(mdispose)
  92.     end if
  93.   end if
  94.   set the soundLevel to gOrigVolume
  95.   if not voidp(gOrigColor) then
  96.     set the colorDepth to gOrigColor
  97.   end if
  98. end
  99.