Hello all,
I'm pretty new to BB and I would like to know if anyone could tell me what I'm doing wrong here? The program runs but the image dosen't animate...
;test animation of image...
Global img,timer,frame
;graphics
Graphics 1024,768,0,2
SetBuffer BackBuffer()
;begin image load
img = LoadAnimImage ("thrasher.bmp",32,32,0,3)
;begin loop
While Not KeyHit(1)
Cls
If MilliSecs() > timer + 100 Then
timer = MilliSecs()
frame = (frame = 1) Mod 3
End If
DrawImage img,0,0,frame
Flip
Wend
Thanks...
I'm pretty new to BB and I would like to know if anyone could tell me what I'm doing wrong here? The program runs but the image dosen't animate...
;test animation of image...
Global img,timer,frame
;graphics
Graphics 1024,768,0,2
SetBuffer BackBuffer()
;begin image load
img = LoadAnimImage ("thrasher.bmp",32,32,0,3)
;begin loop
While Not KeyHit(1)
Cls
If MilliSecs() > timer + 100 Then
timer = MilliSecs()
frame = (frame = 1) Mod 3
End If
DrawImage img,0,0,frame
Flip
Wend
Thanks...