Animation 2

Blitz3D Forums/Blitz3D Beginners Area/Animation 2

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I have sort of got the idea of how animation works now(thanks to DjBigWorm and others). I am having another problem:
Global man, frmman=4, tmrman

Graphics 800,600

SetBuffer BackBuffer()

man=LoadAnimImage("walkingman.jpg",40,40,0,8)

MaskImage man,255,255,255

manx=0
many=280
mansp=2

While Not KeyHit(1)

Color 255,255,255
Rect 0,0,800,600,1

If KeyDown(205) Then

	timing_man()
	
	dir=1
	
	manx=manx+dir*mansp
	
EndIf 

If KeyDown(203) Then

	timing_man()
	
	dir=-1
	
	manx=manx+dir*mansp
	
EndIf
 
DrawImage man,manx,many,frmman

Flip
Cls
 
Wend

;FUNCTIONS;;;;;;

Function timing_man()

If MilliSecs() > tmrman + 100 Then
	
		tmrman=MilliSecs()
		frmman=( frmman + 1 ) Mod 4
		
End If

End Function


I want to make the man go both ways, I can, but the image strip of the man walking left isn't working, how do I make it work?
Here is my man(just save picture as):

I know it looks like he is doing jumping jacks rather then walking :)