Smooth Animation
Smooth Animation
- Subject: Smooth Animation
- From: Rhon Fitzwater <email@hidden>
- Date: Fri, 11 Jun 2004 19:25:07 -0400
Hi,
Right now I have my window so its alpha setting is set to 1.0 when the
mouse enters the window and 0.2 when the mouse exits, using this code:
//mouse entered exited window code below
- (void)viewDidMoveToWindow {
[self addTrackingRect:[self frame] owner:self user
Data:nil
assumeInside:NO];
[super viewDidMoveToWindow];
}
- (void)mouseEntered:(NSEvent *)event {
NSLog(@"Mouse Entered");
[[self window] setAlphaValue:1.0];
}
- (void)mouseExited:(NSEvent *)event {
NSLog(@"Mouse Exited");
[[self window] setAlphaValue:0.2];
}
//end of mouse entered or exited window code
What I want to know how to do is make the transition between alpha
settings smooth. gradually increase or decrease alpha settings. Can
someone tell me how this can be done, possible with some coding
examples?
Thanks,
-Rhon
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.