On Mon, 21 Mar 2011 22:59:04 -0500, Heath Borders <heath.bord...@gmail.com> 
said:
>That's exactly what I did.  I have a brand new project with just a
>ViewController with 3 views
>
>[SNIP ridiculous quantities of code]

I can't read that. And it isn't what I suggested you do. I said make a 
*minimal* project. Enough to prove to yourself that setting the contentURL 
works. And no more than that! Here's my code; this is what I mean when I say 
"minimal" and "simple" and stuff like that:

- (void)viewDidLoad {
    [super viewDidLoad];
    MPMoviePlayerController *player = [[MPMoviePlayerController alloc] init];
    player.shouldAutoplay = NO;
    player.controlStyle = MPMovieControlStyleNone;
    [player.view setFrame: CGRectMake(0,0,200,150)];
    [self.view addSubview: player.view];
    self.thePlayer = player;
    [player release];

}
- (IBAction)play1:(id)sender { // button 1
    [self.thePlayer setContentURL: [[NSBundle mainBundle] 
        URLForResource:@"blend1" withExtension:@"mp4"]];
    [self.thePlayer play];
}

- (IBAction)play2:(id)sender { // button 2
    [self.thePlayer setContentURL: [[NSBundle mainBundle] 
         URLForResource:@"xbox" withExtension:@"mp4"]];
    [self.thePlayer play];
}

That's all. It works. So then you build up from there towards what you *really* 
want to do. When it stops working, that's when you broke it. m.


--
matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to