Playing Multiple Sounds In a Row
Mac OS 9 Mac OS X Windows Linux

This is an example of how to play multiple sounds in a row on an openCard handler. The following code is in the card script.

global soundCount 
global soundList 
 
on openCard 
  put 1 into soundCount 
  put "darn you.wav,aaah.wav,goodie.wav,oh yeah.wav,talk to you.wav" into soundList 
  playmysounds 
end openCard 
 
on playMySounds 
  if soundCount <= the number of items of soundList then 
    play audioclip (item soundCount of soundList) 
    put soundCount + 1 into soundCount 
  end if 
end playMySounds 
 
on playstopped 
  playMySounds 
end playstopped
Posted 3/21/2002 by Glen Yates to the MetaCard List   (See the complete post/thread)