include "window.inc"

Window "Fade in: Fade out",800,600,1
Font 12,24,0,"courier"

sys a1, i=1, single x
a1= LoadBmp "images/MyDrop",0

While EscKey()=0
ClsColor 0,0,0
SetBlend a1,0,0,800,600,x

iF i=1 and x <255 
   x += 0.8
Else
   i=2
End iF

iF i=2 and x >0  
   x -= 0.8
Else
   i=1
End iF

FlipBuffer 
WaitFor 60
Wend
WinEnd