Hello
I have some basic code for adding a QTMovieView. I want it to fade in, so I add an animation on setAlphaValue. Only issue is that it doesn't work. The alpha value is instantly set to whatever it was supposed to animate to. If I try animating e.g. setFrame: it works fine. You'll find my code below. This is on 10.5.7 with the Mac OS X 10.5 SDK.
- (void)addMovie:(NSString *)aFile
{
QTMovieView *aMovieView;
QTMovie *aMovie;
NSRect contentFrame;
contentFrame = [[self contentView] frame];
aMovieView = [[QTMovieView alloc]
initWithFrame:contentFrame];
[aMovieView setWantsLayer:YES];
[aMovieView setControllerVisible:NO];
[aMovieView setPreservesAspectRatio:YES];
aMovie = [[QTMovie alloc]
initWithFile:aFile error:nil];
[aMovieView setMovie:aMovie];
[aMovieView setAlphaValue:0.4];
[[self contentView] addSubview:aMovieView];
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:2.0];
[[aMovieView animator] setAlphaValue:0.9];
[NSAnimationContext endGrouping];
}
Any ideas?