Re: NSMovie init
Re: NSMovie init
- Subject: Re: NSMovie init
- From: publiclook <email@hidden>
- Date: Fri, 9 May 2003 19:09:50 -0400
Just use NSBundle's -pathForResource:ofType: to get the path to a
bundled movie.
On Friday, May 9, 2003, at 06:01 PM, Jeff Martirano wrote:
I'm having a bit of trouble creating an NSMovie pointer. It works fine
when I init with an outside URL with "initWithURL:[NSURL
URLWithString:@"http://someserver.com/movie.mov"] byReference:YES];"
or with a hard coded path to a local file:"initWithURL:[NSURL
URLWithString:@"file:///path/to/directory/movie.mov"]
byReference:YES];"
but I can't make it work when trying to play a movie that I will
bundle with the application. I've copied the movie into the project
and tried to reference it with "initWithURL:[NSURL
URLWithString:@"file://movie.mov"] byReference:YES];" and other
variations, but that doesn't seem to work.
For images, I typically use "[[NSImage alloc]
initByReferencingFile:[[NSBundle bundleForClass:[self class]]
pathForImageResource:@"image.png"]];" but NSMovie doesn't seem to have
a comparable init method.
Any ideas? Danke in advance.
Jeff
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >NSMovie init (From: Jeff Martirano <email@hidden>) |