10-21-2022, 04:08 PM
Now let' take the last example and use it as a GOSUB...
Pete
Code: (Select All)
CLS
SCREEN _NEWIMAGE(1200, 900, 32)
DIM SHARED DarkGreen&
DIM SHARED Yellow&
DIM SHARED Pink&
DarkGreen& = _RGB32(0, 129, 0)
Yellow& = _RGB(255, 255, 0)
Pink& = _RGB(216, 50, 166)
'Large background box
LINE (0, 0)-(1199, 50), Pink&, BF
SLEEP
c1 = 7
r1 = 7
c2 = 126
r2 = 46
'The 5 smaller box
LINE (c1, r1)-(c2, r2), DarkGreen&, BF
r1 = 51
r2 = 93
'The Drop Down
mydelay = .05 ' <====================
z = TIMER ' <====================
_KEYCLEAR
DO
IF z > TIMER THEN z = z - 86400 ' Midnight adjustment.
IF TIMER - z > mydelay THEN z = TIMER: GOSUB dropit
LOCATE 20, 40: PRINT INT(RND * 100) + 1; " ";
LOOP UNTIL LEN(INKEY$)
END
dropit:
DDwn = DDwn + 1
COLOR Yellow&
_PRINTSTRING (12, 15), "Opening Info"
LINE (c1, r1)-(c2, r2), DarkGreen&, BF
r1 = r1 + DDwn
r2 = r2 + DDwn
IF DDwn = 25 THEN DDwn = 0: r1 = 0: r2 = 0
RETURN
Pete