title: How do I make a button play sounds in a certain order using an array?
body: <p>I'm coding in Objective-C for the iPhone and I am trying  create an array that plays a series of sounds. For example the first time I press the button I want it play sound <strong>"0.wav"</strong>, but the second time I want it to play <strong>"1.wav"</strong>, then <strong>"2.wav"</strong>, <strong>"3.wav"</strong>, etc. Then when I've played a total of 14 sounds (up to "13.wav") I want the loop to start over playing with 0.wav. I've looked around Google and the Apple development documentation for almost 4 days without much luck. So if someone could help me generate a code for this that would be greatly appreciated and if you wouldn't mind could you attempt to explain the code briefly so that I can learn what each part does.</p>
  
  <p>Thank you, Joey</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>Okay I've gotten the Array part down (thanks to Thomas) however neither of us are sure how to implement the soundID from the array to the action where I play the sound and how to play that sound. I used the format Thomas used for his array below if that helps you with your answer.</p>
  
  <p>Thanks, Joey</p>