_TITLE "Blinking and more with text string" 'b+ 2020-02-15
'===================================================================================
' Lets blink between colors white and blue, expanding and shrinking text for 10 secs
'===================================================================================
s$ = "Blink colors white and blue, expanding and shrinking centered text for 10 secs"
th = 16 'Text Height - start normal
dh = 1 'change height
flashTimes = 100 'with limit 10 this will take 10 times a second and be done in 100/10 secs
IF toggle
= 1 THEN C~&
= &HFFFFFFFF ELSE C~&
= &HFF0000FF toggle = 1 - toggle
th = th + dh
IF th
> 64 THEN th
= 64: dh
= -dh
IF th
< 6 THEN th
= 6: dh
= -dh
flashTimes = flashTimes - 1
PRINT lastFlash$;
" <<<< notice these numbers are not flashing even though we CLS every frame" _DISPLAY '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> eliminates blinking screens when use CLS _LIMIT 10 '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> allows maximum number of loops of 10 per sec
'center the text at x, y with given height and color
'screen snapshot
mult = textHeight / 16
xlen
= LEN(txt$
) * 8 * mult
_PUTIMAGE (x
- .5 * xlen
, y
- .5 * textHeight
)-STEP(xlen
, textHeight
), I&
, cur&