_Title "Fade In-Out Tests per Steve Test _SetAplpha" ' b+ 2021-10-04 ' Steve suggest: _SetAlpha alphaLevel255& [, color1&][ TO color2&] [, iHdl&]
' bplus idea random fill overlapping at low to middle transparencey using Point probably very lumpy image
Screen _NewImage(120 * 8, 30 * 16, 32) ' current screen size for Halloween Crypt-O-Gram Print "Here is Image to Fade In-Out, zzz... press any"
' make sample image
Print "Here is background I want to Fade-In Image over, zzz... press any" FadeIn snap&, fio&, 7 ' well that works nicely
FadeOut snap&, fio&, 15
Sub FadeIn
(BackHdl&
, Img&
, secs
) 'Here is Wiki on _SetAlpha
'Syntax
'_SETALPHA alpha&[, color1&][ TO colour2&] [, imageHandle&]
'Parameters
'alpha& is the new alpha level to set, ranging from 0 (transparent) to 255 (opaque).
'color1& designates the 32-bit LONG color value or range of color values color1& TO colour2& to set the transparency.
'If no color value or range of colors is given, the entire image's alpha is changed, including any _CLEARCOLOR settings.
'If imageHandle& is omitted, it is assumed to be the current write page or destination image.
'timing
tf
= Int(255 / secs
) ' 255 image transparencies from 0 to 255 in secs seconds
Sub FadeOut
(BackHdl&
, Img&
, secs
) tf
= Int(255 / secs
) ' 255 image transparencies from 0 to 255 in secs seconds