12-18-2022, 02:34 PM
A simple Marquee effect to display a horizontally scrolling seasonal message.
Code: (Select All)
'merry marquee
_Title "Merry Marquee"
Screen _NewImage(800, 288, 256)
msg = _NewImage(800, 288, 256)
_Dest msg
Color 8, 0
A$ = " Have A MERRY CHRISTMAS and a HaPpY NeW YeAr !!! "
Print A$
_Source msg
_Dest 0
Color 15, 0
pmax = Int((_Width) / 8)
prows = Len(A$) * 8
If prows < pmax Then
maxp = prows
Else
maxp = (prows + 1) - pmax
End If
For pstart = 0 To maxp
_Limit 20
Cls
For y = 0 To 16
x = 1
Color 15, 0
If Int(Rnd * 20) < 5 Then _PrintString (Int(Rnd * _Width), Int(Rnd * _Height)), "*"
Do
If Point(pstart - 1 + x, y) <> 0 Then
Color Int(1 + Rnd * 8)
Locate y + 2, x + 1
Print Chr$(219)
End If
x = x + 1
Loop Until x = pmax - 8
Next y
_Display
Next pstart