Rem Blink Rem Built with RFO Basic! Rem June 2015 Rem Version 1.00 Rem By Roy di_height = 1230 % set to my Device di_width = 800 gr.open gr.set.AntiAlias 1 gr.orientation 1 pause 1000 gr.screen screenWidth,screenHeight scale_x=screenWidth/di_width scale_y=screenHeight/di_height gr.scale scale_x,scale_y gr.render gr.set.stroke 1 gr.text.size 80 xx = 800 : xxx = - 30 dim wink[15] gosub SetColours gosub BlinkEyeLeft gosub BlinkEyeRight gosub BlinkText gosub Blink end Blink: do for x = 2 to 10 pause 100 if x = 6 then pause 200 !Eye Left if x = 2 then gr.modify wink[2], "paint", black if x = 3 then gr.modify wink[3], "paint", black if x = 4 then gr.modify wink[4], "paint", black if x = 5 then gr.modify wink[5], "paint", black if x = 6 then gr.modify wink[5], "paint", magenta if x = 7 then gr.modify wink[4], "paint", white if x = 8 then gr.modify wink[3], "paint", white if x = 9 then gr.modify wink[2], "paint", white !Eye Right if x = 2 then gr.modify wink[7], "paint", black if x = 3 then gr.modify wink[8], "paint", black if x = 4 then gr.modify wink[9], "paint", black if x = 5 then gr.modify wink[10], "paint", black if x = 6 then gr.modify wink[10], "paint", magenta if x = 7 then gr.modify wink[9], "paint", white if x = 8 then gr.modify wink[8], "paint", white if x = 9 then gr.modify wink[7], "paint", white gosub ChangeTextColour gr.render next until 0 return BlinkEyeLeft: Gr.oval wink[1], 200, 200, 400, 400 gr.modify wink[1], "paint", black Gr.oval wink[2], 200,220, 400, 380 gr.modify wink[2], "paint", white Gr.oval wink[3], 200,240, 400, 360 gr.modify wink[3], "paint", white Gr.oval wink[4], 200, 260, 400, 340 gr.modify wink[4], "paint", white Gr.oval wink[5], 250, 280, 350, 320 gr.modify wink[5], "paint", magenta gr.render return BlinkEyeRight: Gr.oval wink[6], 400, 200, 600, 400 gr.modify wink[6], "paint", black Gr.oval wink[7], 400,220, 600, 380 gr.modify wink[7], "paint", white Gr.oval wink[8], 400,240, 600, 360 gr.modify wink[8], "paint", white Gr.oval wink[9], 400, 260, 600, 340 gr.modify wink[9], "paint", white Gr.oval wink[10], 450, 280, 550, 320 gr.modify wink[10], "paint", magenta gr.render return BlinkText: t$ = "Blinking Eyes" t2$ = "Demo using gr.paint.get and gr.modify , 'paint', " gr.text.width w , t$ tab = di_width/2 : tab = tab - (w / 2) gr.text.bold 1 gr.text.draw wink[11],tab, 100, t$ gr.modify wink[11], "paint", red gr.text.draw wink[12],xx, 600, t2$ gr.modify wink[12], "paint", red return SetColours: gr.color 255,0,0,0,1 % black gr.paint.get black gr.color 255,255,0,0,1 % Red gr.paint.get red gr.color 255,0,255,0,1 % green gr.paint.get green gr.color 255,0,0,255,1 % blue gr.paint.get blue gr.color 255,255,255,0,1 % yellow gr.paint.get yellow gr.color 255,0,255,255,1 % cyan gr.paint.get cyan gr.color 255,255,0,255,1 % magenta gr.paint.get magenta gr.color 255,255,255,255,1 % white gr.paint.get white return ChangeTextColour: if x = 2 then gr.modify wink[11], "paint", red if x = 3 then gr.modify wink[11], "paint", green if x = 4 then gr.modify wink[11], "paint", blue if x = 5 then gr.modify wink[11], "paint", yellow if x = 6 then gr.modify wink[11], "paint", cyan if x = 7 then gr.modify wink[11], "paint", magenta if x = 8 then gr.modify wink[11], "paint", white xx += xxx : gr.modify wink[12], "x", xx if xx < - 2500 then xxx = abs(xxx) if xx > 800 then xxx = - xxx gr.render return