Sorry if this is a noob question, but All my code is error-free and I cannot figure out how to get the button I press to do all these things. It's connected correctly in interface builder. Anyway, if you can help me out, here's what I have:
IN THE INTERFACE
@interface SuprisedViewController : UIViewController {
IBOutlet UIButton *marsStoryButton;
IBOutlet UIButton *marsStoryHome;
@property (nonatomic, retain) IBOutlet UIButton *marsStoryHome;
@property (nonatomic, retain) IBOutlet UIButton *marsStoryButton;
-(void)marsStoryButtonPressed;
IN THE IMPLEMENTATION
@implementation SuprisedViewController
@synthesize bolloLogo, scaryAlien, exorcist, image1, image2, marsMan, marsStoryButton, marsStoryHome;
-(void)marsStoryButtonPressed {
marsMan.hidden = NO;
marsStoryHome.hidden = NO;
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"longManScream", CFSTR ("wav"), NULL);
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"spressedScream", CFSTR ("wav"), NULL);
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"torturedGirlScream", CFSTR ("wav"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID);
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}