QTMovieView and NSViewAnimation
QTMovieView and NSViewAnimation
- Subject: QTMovieView and NSViewAnimation
- From: email@hidden
- Date: Tue, 27 Sep 2005 19:53:39 -0600
- Resent-date: Tue, 27 Sep 2005 20:58:42 -0600
- Resent-from: email@hidden
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
Hello,
I have been playing around with NSViewAnimations and can get them to
work great for fading in and out between 2 NSImageViews. However,
when I try to fade out an NSImageView and fade in a QTMovieView, the
QTMovieView does not fade in as it should. The image portion of the
movie appears instantly (does not fade) while the controller across
the bottom of the movie does fade in as it should. Has anyone else
seen this problem or have any suggestions on how to get the
QTMovieView to fade in properly? Here is the code I'm using:
NSRect imageFrame = [imageView frame];
NSRect movieFrame = [movieView frame];
NSMutableDictionary *fadeOutDict = [NSMutableDictionary
dictionaryWithCapacity:3];
[fadeOutDict setObject:imageView
forKey:NSViewAnimationTargetKey];
[fadeOutDict setObject:NSViewAnimationFadeOutEffect
forKey:NSViewAnimationEffectKey];
[fadeOutDict setObject:[NSValue valueWithBytes:&imageFrame
objCType:@encode(NSRect)]
forKey:NSViewAnimationEndFrameKey];
NSMutableDictionary *fadeInDict = [NSMutableDictionary
dictionaryWithCapacity:3];
[theOtherDict setObject:movieView
forKey:NSViewAnimationTargetKey];
[theOtherDict setObject:NSViewAnimationFadeInEffect
forKey:NSViewAnimationEffectKey];
[theOtherDict setObject:[NSValue valueWithBytes:&movieFrame
objCType:@encode(NSRect)]
forKey:NSViewAnimationEndFrameKey];
NSViewAnimation *fadeAnim = [[NSViewAnimation alloc]
initWithViewAnimations:[NSArray
arrayWithObjects:fadeOutDict, fadeInDict, nil]];
[theAnim setDuration:1.0];
[theAnim startAnimation];
Any help is greatly appreciated! Thanks!
Phil Piwonka
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden