home *** CD-ROM | disk | FTP | other *** search
/ Hope PC Multimedia SuperPack 2 / HOMEPC.iso / TAROT / DOWNLOAD / VT3.ZIP / C1.DXR / 00214.ls < prev    next >
Encoding:
Text File  |  1995-11-02  |  2.4 KB  |  111 lines

  1. on InitSnd
  2.   mixDown(1, 0)
  3.   mixDown(2, 0)
  4.   PlaySound(1, "Silence", 0, 0)
  5.   PlaySound(2, "Silence", 0, 0)
  6. end
  7.  
  8. on PlayBackSnds
  9.   global BackSnds, PlayBS
  10.   if PlayBS then
  11.     set SndPlay to random(4)
  12.     PlaySound(2, BackSnds(mget, SndPlay), 0, 0)
  13.   end if
  14. end
  15.  
  16. on PlaySound chan, sndName, wait, fade
  17.   global moviePath, chanvols, Cnt
  18.   if sndName <> "Silence" then
  19.     put "PlaySound: file=", moviePath & "sounds:" & sndName && "Chan:" & chan
  20.   end if
  21.   set Vol to chanvols(mget, chan)
  22.   if fade = 0 then
  23.     set the volume of sound chan to 0
  24.     sound stop chan
  25.   else
  26.     if soundBusy(chan) then
  27.       repeat with i = 0 to Vol
  28.         set the volume of sound chan to Vol - i
  29.         set i to i + 50
  30.       end repeat
  31.       sound stop chan
  32.     end if
  33.   end if
  34.   if the machineType = 256 then
  35.     sound playFile chan, moviePath & "sounds\" & sndName
  36.   else
  37.     sound playFile chan, moviePath & "sounds:" & sndName
  38.   end if
  39.   if fade = 0 then
  40.     set the volume of sound chan to Vol
  41.   else
  42.     set i to 1
  43.     repeat while i < Vol
  44.       set the volume of sound chan to i
  45.       set i to i + 10
  46.     end repeat
  47.   end if
  48.   if wait = 1 then
  49.     repeat while soundBusy(chan)
  50.       if the controlDown then
  51.         set Cnt to 1
  52.         sound stop chan
  53.       end if
  54.       go(the frame)
  55.     end repeat
  56.   end if
  57. end
  58.  
  59. on keySound sound
  60.   global Instruct
  61.   if Instruct <> 1 then
  62.     cursor(4)
  63.   end if
  64.   if the machineType = 256 then
  65.     PlaySound(1, "NavVocal\" & sound, 1, 1)
  66.   else
  67.     PlaySound(1, "NavVocal:" & sound, 1, 1)
  68.   end if
  69.   if Instruct <> 1 then
  70.     cursor(-1)
  71.   end if
  72. end
  73.  
  74. on CardSound sound
  75.   global author, Cnt
  76.   cursor(4)
  77.   if author = "Foster" then
  78.     if the machineType = 256 then
  79.       PlaySound(1, "3word\Foster\" & sound, 1, 1)
  80.     else
  81.       PlaySound(1, "3word:Foster:" & sound, 1, 1)
  82.     end if
  83.   else
  84.     if the machineType = 256 then
  85.       PlaySound(1, "3word\Waite\" & sound, 1, 1)
  86.     else
  87.       PlaySound(1, "3word:Waite:" & sound, 1, 1)
  88.     end if
  89.   end if
  90.   set Cnt to 0
  91.   cursor(-1)
  92. end
  93.  
  94. on MixUp chan, amnt
  95.   set curr to the volume of sound chan
  96.   if soundBusy(chan) then
  97.     repeat with i = 1 to amnt - curr
  98.       set the volume of sound chan to curr + i
  99.     end repeat
  100.   end if
  101. end
  102.  
  103. on mixDown chan, amnt
  104.   set curr to the volume of sound chan
  105.   if soundBusy(chan) then
  106.     repeat with i = 1 to curr - amnt
  107.       set the volume of sound chan to curr - i
  108.     end repeat
  109.   end if
  110. end
  111.