4 pictures = 4 diferents sound
Hi.
i Need to make for my iphone 4 pictures of animals.
and when people touch a dog, .... sound like dog.
if touch a cat....sound like a cat.... etc....
i get this code from a nice tutorial:
- (void)touchesBegan: (NSSet *)touches withEvent: (UIEvent *)event {
[soundEffect play];
here say, every pixel of the screan is touched.... play a sound.
but ineed 4 pictures , and 4 diferents sound.
how can I do to say xCode to play a sound every time touch a picture please?
thanks a lot. !
i Need to make for my iphone 4 pictures of animals.
and when people touch a dog, .... sound like dog.
if touch a cat....sound like a cat.... etc....
i get this code from a nice tutorial:
- (void)touchesBegan: (NSSet *)touches withEvent: (UIEvent *)event {
[soundEffect play];
here say, every pixel of the screan is touched.... play a sound.
but ineed 4 pictures , and 4 diferents sound.
how can I do to say xCode to play a sound every time touch a picture please?
thanks a lot. !
Personally I would make the images custom UIButtons and then link those to an action that played a sound.
kodex Wrote:......UIButtons with action that played a sound.
could you tellme please how add an action (play sound) to a UIButtons ?
please help.
thanks a lot !
-(IBAction)playSound1
{
[sound1 play]
}
ect, then link them to the buttons in IB
{
[sound1 play]
}
ect, then link them to the buttons in IB
to valuable for me. realy thank You !
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Taking Pictures of Game State inside an app | Bersaelor | 7 | 4,594 |
Nov 3, 2009 05:07 AM Last Post: Bersaelor |
|
| [iPhone/OpenGL-ES] Loading/Drawing Pictures & Main Loop, where is it? | jAuriya | 6 | 6,020 |
Feb 2, 2009 10:12 AM Last Post: longjumper |
|
| zoom out is not working on pictures ! | imaumac | 0 | 1,495 |
Jan 5, 2009 10:41 AM Last Post: imaumac |
|

......UIButtons with action that played a sound.