Code archives/Miscellaneous/Fading Text

This code has been declared by its author to be Public Domain code.

Download source code

Fading Text by Petron2006
To start with this isn't all my code it was made by my friend Michael. Now he mostly does music, but I give him thanks for this code. I hope that you like it.
Function Fade(textstring$,x#,y#,time#,font$,fontsize#)
r = 0
g = 0
b = 0
a = LoadFont(font$,fontsize#,0,0,0)
SetFont a

;Fade in
Repeat:
r = r + 1
Delay (time#)
g = g + 1
Delay (time#)
b = b + 1
Delay (time#)
Color r,g,b
Text x#,y#,textstring$
Until r = 255 And g = 255 And b = 255

;Fade out

Repeat:
r = r - 1
Delay (time#)
g = g - 1
Delay (time#)
b = b - 1
Delay (time#)
Color r,g,b
Text x#,y#,textstring$
Until r = 0 And g = 0 And b = 0
Cls
FreeFont (a)
End Function

Comments

None.

Code Archives Forum