IKG, which terms are you unfamiliar with?
Anyway here is some commented code which displays a simple 3 cell animation (I use an animimage with 3 different coloured rectangles each 32*32 in size)
SuperStrict
Rem
this is the animated_sprite type
End Rem
Type TAnim_Sprite
Global list:Tlist=CreateList() ' The list isn't used in this example.
Field x:Int=100 ' sprite x position
Field y:Int=100 ' sprite y position
Field image:TImage ' sprite image taken from Loadanimimage command.
Field frame:Int = 0 ' current_frame
Field maxframe:Int ' maximum number of frames
Field anim_time:Int=500 ' delay between changing the frame
Field last_change:Int=0 ' the last time the frame was changed.
Function create:TAnim_Sprite(image:TImage , startframe:Int , maxframe:Int)
Rem
Function which creates a TAnim_sprite and populates the frame information.
End Rem
Local my_anim:TAnim_Sprite = New TAnim_Sprite
my_anim.image = image
my_anim.frame=startframe
my_anim.maxframe = maxframe - 1
ListAddLast list,my_anim
Return my_anim
End Function
Method change_speed(speed:Int)
Rem
Method used to change the delay between changing the frame.
End Rem
anim_time = anim_time + speed
If anim_time < 0 anim_time = 0
If anim_time > 1000 anim_time=1000
End Method
Method get_speed:Int()
Rem
simply returns the time between frame changes.
End Rem
Return anim_time
End Method
Method update()
Rem
Method called to check whether we need to change the frame for the tanim_sprite
End Rem
' If the current time - the last_changed is greater than the time between
' changes then it's time to change the frame.
If MilliSecs() - last_change > anim_time
frame:+ 1
If frame > 2 frame=0
last_change = MilliSecs()
EndIf
End Method
Method Draw()
Rem
Method which draws the image with the current frame.
End Rem
DrawImage image , x , y , frame
End Method
End Type
Graphics 640 , 480
' Load the animation.
Local image:TImage = LoadAnimImage("anim_timer.png" , 32 , 32 , 0 , 3)
' Create an 'instance' of Tanim_sprite and save it's pointer in myplayer.
Local myplayer:TAnim_Sprite = TAnim_sprite.create(image,0,3)
While Not KeyHit(KEY_ESCAPE)
Cls
' if we press UP cursor or DOWN cursor, change the speed.
If KeyDown(KEY_UP) myplayer.change_speed(-5)
If KeyDown(KEY_DOWN) myplayer.change_speed(5)
' call the update and draw method for our 'player' sprite.
myplayer.update()
myplayer.draw()
DrawText myplayer.get_speed() , 0 , 0
Flip
Wend
Written quite a while ago so might be clunky but should give an idea.