title: iPhone SDK: How do you stop video playback with code?
body: <p>In my app, I play a video using this simple code:</p>
  
  <pre><code>NSBundle *bundle = [NSBundle mainBundle];
  NSString *moviePath = [bundle pathForResource:@"video" ofType:@"mp4"];
  NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
  MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
  theMovie.movieControlMode = MPMovieControlModeHidden;
  [theMovie play];
  </code></pre>
  
  <p>I'd like to know how to stop the video with code, I have tried <code>[theMovie stop];</code> but this doesn't work, and an error is given, 'theMovie' undeclared (first use in this function) Which is understandable as the "theMovie" is only declared in the method that plays it. Has anyone got any ideas on how to stop it with out having to show the built in movie player controls? Any Help appreciated.  </p>