QTMovie
ムービーのポインタを返します
返り値
( void * )
ポインタ
引数
フレームワーク
ApplicationKit
クラス
NSMovie
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)act:(id)sender;//アクション { NSLog([[NSMovie movieUnfilteredFileTypes] description]); } - (IBAction)setMov:(id)sender//ムービーをセット { //開けるファイル拡張子の配列 NSArray *imgTypes = [NSMovie movieUnfilteredFileTypes]; //OpenPanelを作る NSOpenPanel *opPanel = [ NSOpenPanel openPanel ]; //OpenPanelの結果のボタン番号 int opRet; //ムービーのURL NSURL *movUrl ; //ムービー NSMovie *theMovie; void *mPointer; NSMovie *qtmov; //OpenPanelでファイル選択 opRet = [ opPanel runModalForDirectory : NSHomeDirectory() //どこのディレクトリを出すか file : @"Movies" //どのどのファイルを選択しておくか types : imgTypes ];//選べるファイルタイプ if ( opRet == NSOKButton ) { // OPENPanelのボタンがOKなら //NSImageを作ってファイルから読み込む movUrl = [NSURL fileURLWithPath:[ opPanel filename ]]; theMovie = [[NSMovie alloc] initWithURL:movUrl byReference:YES]; [myOutlet setMovie:theMovie]; mPointer = [[myOutlet movie] QTMovie]; } } @end