movie
movie
- Subject: movie
- From: bob <email@hidden>
- Date: Wed, 26 Nov 2003 12:36:46 +0100
i'd like create a window an a second screen with a movie in.
for that i use the code below.
My problem is that few movies don't like to be resize. so i don't know
how i can resize the movieView to the movie size.
thanks for help.
- (void)createLogoWindowOnScreen:(NSScreen *)aScreen
{
NSMovie *movie;
NSMovieView *movieView;
NSString * moviePath;
NSWindow* result = [[NSWindow alloc] initWithContentRect:[aScreen
frame] styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered
defer:NO];
[result setBackgroundColor:[NSColor whiteColor]];
[result setLevel:NSNormalWindowLevel];
[result setAlphaValue:1.0];
[result setOpaque:YES];
[result setHasShadow:NO];
if ([[NSUserDefaults standardUserDefaults] stringForKey:@"moviePath"])
{
movieView = [[NSMovieView alloc] init];
moviePath = [[NSUserDefaults standardUserDefaults]
stringForKey:@"moviePath"];
movie = [[NSMovie alloc] initWithURL:[[NSURL alloc] initWithString:
moviePath] byReference:YES];
[movieView setMovie:movie];
[movieView start:nil];
[movieView setHidden:NO];
}
[result setContentView: movieView];
[result orderFront:self];
}
regards
_______________________________________________
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.
- Follow-Ups:
- Re: movie
- From: Ambroise Confetti <email@hidden>