animated image question

BlitzMax Forums/BlitzMax Programming/animated image question

Here's some code I whipped up using the above image. Hope it helps.
SuperStrict
Graphics 800,600

Local Image:TImage = LoadAnimImage("customerf001eatzp8.png",73,120,0,11)
Local BlinkTime:Int = MilliSecs() + 2000 'time til next blink
Local FrameTime:Int = MilliSecs() + 333 'time til next frame
Local Blink:Int = False 'blinking?
Local Frame:Int = 0 'current frame
Local Back:Int = False 'are we viewing from the back?
Local Eat:Int = True 'are we eating?

While Not KeyHit(KEY_ESCAPE) And Not AppTerminate()
	Cls
	
	If Back 'she is facing away from us
		If Eat
			DrawImage Image,100,100,frame+7 'she is eating and facing away from us
		Else
			DrawImage Image,100,100,6 'she is not eating and facing away from us
		End If
		DrawImage Image,100,100,10 'Draw the legs
	Else 'she is facing toward us
		If eat
			DrawImage Image,100,100,4 'draw the body
			DrawImage Image,100,100,frame 'draw the arm
		Else
			DrawImage Image,100,100,3 'not eating
		End If
		If Blink 'is she blinking?
			DrawImage Image,100,100,5
		End If
	End If
	DrawText "B = Swap font/back view",10,500
	DrawText "E = Start/Stop eating",10,530
	Flip
	
	If MilliSecs() >= BlinkTime
		If Blink 'was she already blinking?
			Blink = False 'open eyes
			BlinkTime :+ 2000 '2 seconds before next blink
		Else
			Blink = True 'close eyes
			BlinkTime :+ 500 'keep eyes closed for .5 seconds
		End If
	End If

	If MilliSecs() >= FrameTime 'update the frame
		Frame :+ 1
		If Frame = 3 Then Frame = 0
		FrameTime :+ 333
	End If

	If KeyHit(KEY_B) 'swap back-front view
		If Back
			Back = False
		Else
			Back = True
		End If
	End If

	If KeyHit(KEY_E) 'swap eating, not eating
		If Eat
			Eat = False
		Else
			Eat = True
		End If
	End If	
Wend