Here is a rather good fade out for your character, Extremely simple and easy. fades out on Full Color background image (attachment below)
'dissolving on full color background!
'-----------------All the setup------------------------
Layer
(1) = _NEWIMAGE(640, 480, 32) 'mix layerLayer
(2) = _LOADIMAGE("backgroundimage.jpg", 32) 'our colorful imageLayer
(4) = _NEWIMAGE(32, 48, 32) 'dissolving character MAGIC layer!'-----------------Setup Done---------------------------
_PUTIMAGE , Layer
(3), Layer
(4), (0, 0)-STEP(31, 47) 'place the current character sprite on to the MAGIC fade layer.
_DELAY .25 'let the window be created fully
CA% = 255 'Current Alpha adjustment
FadeSpeed%% = 4 'change this to adjust the speed that the
' character fades out, 1-Very slow, 16-fast, 32-Blink and you miss it.
_PUTIMAGE , Layer
(2), Layer
(1), (0, 0)-STEP(639, 479) 'Place our background image on the mix layer _SETALPHA CA%
, , Layer
(4) ' "FADE" our character sprite out _CLEARCOLOR _RGB32(0, 0, 0), Layer
(4) 'Make sure not to introduce the "Black Box of Damnation!" _PUTIMAGE (250, 300), Layer
(4), Layer
(1) 'place our character sprite on the mix layer _PUTIMAGE , Layer
(1), Layer
(0) 'move the mix layer to the screen
IF FadeHimOut
THEN CA%
= CA%
- FadeSpeed%%
ELSE _PRINTSTRING (10, 465), "Press Space to Fade me out!", Layer
(0) _DELAY .045 'this value seems good.
IF CA%
<= 0 THEN ExitFlag%%
= True
'finish when faded.
now a lot of this is my personal coding method and can be changed, LAYER(), _Delay, ExitFlag%% ect. without much trouble. It just makes it easier for me to keep track of what I'm doing. I have one more idea for a 'transporter' effect that will take more time to hash out. but here you can see the character fade from a full color background. and the code to do this is actually very small.
Hopefully this post works, I added a couple of comments to the code and without thinking hit F5, not sure what that does in Firefox but it did something.