I am more artist than programmer and from my own experience, I would maybe recommend you to have as much files as frames for the anim, just for the start.
example: you have 11 frames for walk-cycled anim. You'll export all these 11 frames to 11 files and name them by some index, e.g. walkanim_1, walkanim_2... Make sure they all are cropped and one size.
Then use your programming script language that copies the bitmap to screen.
I, personally don't use anything else than Macromedia Director. Well, I am not a professional programmer, just an amateur, LOL.
But the principles are always the same, I would say. Animation in programming is nothing more than just copying & pasting pixels from source images to stage with some timer.
try something like this:
FrameTimer = 1
*** looped sequence starts *** - this will be your looped procedure
repeat with x = 1 to 11
if FrameTimer = x then
COPYPIXELS(to stage where you want to see it) FROM YOURANIMATIONFRAME(FrameTimer)
end if
end repeat
FrameTimer = FrameTimer + 1
if FrameTimer > 11 then FrameTimer = 1
*** looped sequence ends ***
sorry for my Macromedia-like script statements. I think you'll find some counterpart for it in your programming language.
----addition
The better way to work with bitmap gfx into you game, that will be animated, you'll need to use filmstrips - this is the method being used by possibly most bitmap graphics games, platformers, even possibly RTSes and RPGs.
Now, what is the filmstrip? e.g. you have a large bitmap file composed of exact frames of the same length - e.g. 40*72 pixels (that would be tall character). And into this format, you'll get your stand animation, walk animation, attack animation, and whatever. Now, the frames will go from 1 to the last in the filmstrip.
You need something like this:
