Hello.
Not sure if this is the best way to go about this, but here it is
I'm working on a Cocos2D for Mac test app, and want to add a QTMovie to a scene/layer.
Compiles fine, doesn't add the movie, or at least it's not visible. Any ideas?
I guess another thing to cosnider would be, can you add a QTMovie to an NSView programatically, or is it only supported via Interface Builder?
Not sure if this is the best way to go about this, but here it is
Code:
shrigString = [[NSBundle mainBundle] pathForResource:@"shrig_h264_720p" ofType:@"mov"];
shrigURL = [NSURL fileURLWithPath:shrigString];
shrigMovie = [QTMovie movieWithURL:shrigURL error:nil];
[shrigMovieView setMovie:shrigMovie];
[[[CCDirectorMac sharedDirector] openGLView] addSubview:shrigMovieView.view];
shrigMovieView.frame = CGRectMake(size.width /2, size.height /2, 1024, 576);
[shrigMovie autoplay];
Compiles fine, doesn't add the movie, or at least it's not visible. Any ideas?
I guess another thing to cosnider would be, can you add a QTMovie to an NSView programatically, or is it only supported via Interface Builder?
Last edited: