home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / rollerrush / game.dcr / MPe_1_playsound.ls < prev    next >
Encoding:
Text File  |  2007-10-01  |  607 b   |  24 lines

  1. global gMusicDirectory, gMusicPlayList, gCurrentSong, gMusicStop, gShuffling, gShuffledMusicPlayList, gMusicSelect, gCurrInGameTrack, gCurrProfile
  2.  
  3. on playSound channel, sName
  4.   global gSound
  5.   if member(sName).type = #empty then
  6.     put "sound not found", sName
  7.     return 
  8.   end if
  9.   if gSound > 0 then
  10.     if channel < 9 then
  11.       puppetSound(channel, 0)
  12.       puppetSound(channel, sName)
  13.     else
  14.       repeat with b = 3 to 8
  15.         if not sound(b).isBusy() then
  16.           puppetSound(b, 0)
  17.           puppetSound(b, sName)
  18.           exit repeat
  19.         end if
  20.       end repeat
  21.     end if
  22.   end if
  23. end
  24.