home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-05 | 933 b | 47 lines | [TEXT/MPS ] |
- /*
- File: mtb2.c
- Contains: Movie Toolbox Functions
- Written by: DTS and QT Engineering
- Copyright: © 1992-1994 by Apple Computer, Inc., all rights reserved.
- Change History (most recent first):
- <1> 12/4/94 khs changed the format of the file to the new look and feel
- To Do:
- */
-
-
- // INCLUDES
- #include "mtb.h"
-
-
- // FUNCTIONS
- Movie GetMovie(void)
- {
- OSErr err;
- SFTypeList typeList =
- {
- MovieFileType, 0, 0, 0
- };
- StandardFileReply reply;
- Movie aMovie = nil;
- short movieResFile;
-
- StandardGetFilePreview(nil, 1, typeList, &reply);
- if (reply.sfGood)
- {
- err = OpenMovieFile(&reply.sfFile, &movieResFile, fsRdPerm);
- if (err == noErr)
- {
- short movieResID = 0; // want first movie
- Str255 movieName;
- Boolean wasChanged;
-
- err = NewMovieFromFile(&aMovie, movieResFile, &movieResID, movieName, newMovieActive,// flags
- &wasChanged);
- CloseMovieFile(movieResFile);
- }
- }
- return aMovie;
- }
-
-
-