Playing a movie on button click?

Discussion in 'Mac Programming' started by imfrog2002, Dec 23, 2007.

  1. imfrog2002 macrumors 6502

    Oct 20, 2007
    Okay, I'm trying to make a game for my Children's Ministry at my Church. (Dual Window, one window that the kids see, one for the operator.) Right now, I can do about 75% of it by learning how to do ONE thing: Run a Quicktime Movie on a buttonclick. I know that I should get the book, but I'm dirt poor, and for now I just want to make a basic application for my church. If anybody is willing to help, I would greatly appreciate it. Thanks! (I'm trying to make it in xcode 3 and Cocoa.)
  2. kainjow Moderator emeritus


    Jun 15, 2000
  3. imfrog2002 thread starter macrumors 6502

    Oct 20, 2007
    Okay, I'm about ready to give up on being a developer, since Apple's Developer site is so screwed up. I've been looking for ANY kind of "QTKit" or "QTMovie" and there's NOTHING. I found about 100 different types of codes, but nothing on how to implement them with a current application, only how to use them in the current application. PLUS, I can't find the .framework file that I'm supposed to have. A link to the QTKit would be awesome, and any help I can get on why the QTKit framework isn't there would also be helpful. Thanks!
  4. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Just look for Quicktime information with regards to the Cocoa framework.
  5. Sayer macrumors 6502a


    Jan 4, 2002
    Austin, TX
    Look here:

    Theres also sample code from Apple's web site for using QTKit, here:

    Basically you need to add a QuickTime view to the window in IB (there is a palette you have to add from /Developer/Palettes/) and get a QTMovie object from a file on disk and set the QuickTime view to use the movie object:

    QTMovie *mMovie = [QTMovie movieWithFile:movieFileToPlayPath error:nil];
    [mMovieView setMovie:mMovie];
    Then you can simply do:

    [mMovie play];
    And it will play.

    I just made some kind of promo/kiosk display app for a client that shows QT movies on an HD Plasma screen (full screen, which is a whole 'nother thread). It is fairly easy to do, provided you know all the variables ahead of time such as which movie to play, what size screen/view it will be in, etc.

    A lot of useful features of QTKit are only on 10.4 and newer (such as notifications for when the movie stops and such), however. So be aware of that going in.
  6. imfrog2002 thread starter macrumors 6502

    Oct 20, 2007
    Okay, I just realized why I was having so much trouble with the tutorials online! I was using xcode 3 instead of 2.5, and EVERYTHING is messed up in 3. Thanks for the help!

Share This Page