Ok guys, I'm really new to the iPhone dev scene. Anyway, I was messing around with it and I cant really understand what I am missing. I'm teaching myself how to do it, so that's probably my first error.
Anyway, the app I'm making (for fun, not going to publish it) has 3 different buttons. I want each of those buttons to trigger a different sound. But here's my problem. Each button plays the same one. I am using IB to give each of the buttons the same action (which I've defined as "btnplaysoundClick")
In Xcode I have the following code set up-
I changed the file names (sound, soundd, sounddd, and file1 2 and 3 for this post.
Anyway, does anyone see what my problem is? They all play the same sound. Any help is appreciated!
Anyway, the app I'm making (for fun, not going to publish it) has 3 different buttons. I want each of those buttons to trigger a different sound. But here's my problem. Each button plays the same one. I am using IB to give each of the buttons the same action (which I've defined as "btnplaysoundClick")
In Xcode I have the following code set up-
PHP:
- (IBAction)btnplaysoundClick
{
isound *sound = [[isound alloc] initWithFileName:@"file1.wav"];
[sound play];
isound *soundd = [[isound alloc] initWithFileName:@"file2.wav"];
[soundd play];
isound *sounddd = [[isound alloc] initWithFileName:@"file3.wav"];
[sounddd play];
}
I changed the file names (sound, soundd, sounddd, and file1 2 and 3 for this post.
Anyway, does anyone see what my problem is? They all play the same sound. Any help is appreciated!