hi all, i hv few images , and i am showing these images through for loop, so i am getting a value in mCurrentImageView , which indicates which image is currently shown up.
now i want to play audio on each image view, different audios. for ex,
if(mCurrentImageView ==0) {
play "a"
}
if (mCurrentImageView ==1)
{
play "b"
}
....
something like dat. bu t i am not sure how to do this, since i should have one Audioplayer, which should play different audios on the basis opf mCurrentImageView's value.
this is my Avaudioplayer code
filePath = [[NSBundle mainBundle] pathForResource:@"b"ofType:@"mp3"];
fileURL = [[NSURL alloc] initFileURLWithPath:filePath];
player = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:nil];
[player prepareToPlay];
[player play];
plz suggest, what should i do to move further.
regards