screenFadeOut()

Fade given screen to black in determined time. This command works in asynchronous mode that is it don't halt program execution while fade occurs.
You can still use old screenFade() command instead.

Syntax:
screenFadeOut( screen , time )
variable = screenFadeOut( screen )

If called without time parameter it return fade status:
1 if still running
0 if finished.
Time is expressed in seconds.

Example:
circle(320,240,200)
screenFadeOut( 0, 4 ) ' set up the fade
while screenFadeOut( 0 ) = 1 ' check if fade is still running 
    wait(40)
wend
prints( "done! press any key to quit")
waitKey

See also wait(), screenFadeIn() and screenCrossFade() commands.