Tag Archives: lt

Animate A Fade-Out Of A NSWindow With Objective-C

Animate A Fade-Out Of A NSWindow With Objective-C – (void)fadeOutWindow:(NSWindow*)window{ float alpha = 1.0; [window setAlphaValue:alpha]; [window makeKeyAndOrderFront:self]; for (int x = 0; x < 10; x++) { alpha -= 0.1; [window setAlphaValue:alpha]; [NSThread sleepForTimeInterval:0.020]; } } http://codesnippets.joyent.com/posts/show/12745

Posted in Objective-C | Also tagged , , , , , , , | Leave a comment

Search Displaylist for Bitmap (or any type of DisplayObject)

var bitmap:Bitmap; for (var i:int = 0; i < this.numChildren; i++) { bitmap = this.getChildAt(i) as Bitmap; if (bitmap) break; } Go to Source

Posted in ActionScript | Also tagged , , , , , , , | Leave a comment