Microsoft Small Basic

Program Listing: GHR094
' mahreen miangul
' Blinking Eyes Drawing
' AugUesT 2017
GraphicsWindow.backgroundcolor= "OliveDrab
GraphicsWindow.Width = "1080"
GraphicsWindow.Height = "420"

GraphicsWindow.BrushColor = "crimson"
ell[1] = Shapes.AddEllipse(152,152)
Shapes.Move(ell[1],452,120)
ell[2] = Shapes.AddEllipse(150,150)
Shapes.Move(ell[2],605, 120)
GraphicsWindow.BrushColor = "mediumseagreen"
ell[1] = Shapes.AddEllipse(110,110)
Shapes.Move(ell[1],494, 140)
ell[2 ] = Shapes.Addellipse(110,110)
Shapes.Move(ell[2],605, 140)
GraphicsWindow.BrushColor = "dodgerblue"
ell[1] = Shapes.AddEllipse(80,80)
Shapes.Move(ell[1],526, 160)
ell[2] = Shapes.AddEllipse(80,80)
Shapes.Move(ell[2],605, 160)
GraphicsWindow.BrushColor = "yellow"
ell[1] = Shapes.AddEllipse(50,50)
Shapes.Move(ell[1],552, 179)
ell[2] = Shapes.AddEllipse(50,50)
Shapes.Move(ell[2],608, 179)
GraphicsWindow.BrushColor = "darkslategray
rectangle[1] = Shapes.Addrectangle(30,10)
Shapes.Move(rectangle[1],565, 200)
rectangle[2] = Shapes.Addrectangle(30,10)
Shapes.Move(rectangle[2],615, 200)

' add eyelids
'GraphicsWindow.PenColor = "transparent
GraphicsWindow.PenColor = "snow
GraphicsWindow.BrushColor = "OliveDrab
For i = 1 To 2
eyelids[i] = Shapes.AddEllipse(50, 50)
Shapes.move(eyelids[i], 0, 0)
Shapes.animate(eyelids[i], 552 + (i - 1) * 57, 175, 2000)
EndFor

Timer.Tick = Blink
Timer.Interval = 500

Sub Blink
t = t + 1
If Math.Remainder(t, 6) = 1 Then
For i = 1 To 2
Shapes.HideShape(eyelids[i])
EndFor
ElseIf Math.Remainder(t, 6) = 0 Then
For i = 1 To 2
Shapes.ShowShape(eyelids[i])
EndFor
EndIf
EndSub