Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kislay

macrumors newbie
Original poster
Feb 4, 2009
1
0
HI All

i am working with one application which have several images and they are flipping after some time interval. One MP3 audio is also playing in background.
so just i need that when i push pause button then whole application should pause.But i am able to pause only audio not image flipping.:(

I use NSTimer to flip the image after some second

[NSTimer scheduledTimerWithTimeInterval:10 target:self selector:mad:selector(flipAction:) userInfo:nil repeats:NO];

and i used AVFramework to play and pause the sound.

AVAudioPlayer *newPlayer =[[AVAudioPlayer alloc] initWithContentsOfURL: fileURL error: nil];
[fileURL release];

self.player = newPlayer;
[newPlayer release];

[self.player prepareToPlay];
[self.player setDelegate: self];
[self.player setVolume: 1.0];

[self.player play];

so please help me how to pause sound with image flipping event 
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.