Unless I'm mistaken (which is possible; it is 7 am and i haven't slept yet), you should have goten a compiler error. addFrame appears to take only one argument, whereas you are supplying two.
Anyways, you have a very messy animation method. I suggest you start the whole animation process from scratch. At the program start or something, you might want to create arrays or vectors of the different animations. That is, each array or vector would stand for one animation(i.e. walking left, walking right, attacking left, etc.). Now, the "animations" would just be pointers to the different frames in the sequence they appear. Keep in mind, if you will be doing something like "MyAnim = load_bitmap(...)", that you must then iterate through each array deleting those bitmaps at the end of the program. Because of that, I would suggest using those pointers to point to data from a datafile(check the allegro docs for that).
Since you should now have those predefined animations that are much easier to work with finished, you can more easily handle the playing or pausing of the animation in your objects' draw event. Just keep a variable or two on hand to make note of if you should be playing the animation or not, and what frame you are currently on. Obviously, when you get to the end of the animation, you need to loop back to the 0th frame, and you should probably only increment your animation frames once every few screen frames.
Ich denkst, diese forum ist nur fur Englisch. All posts must either be in english, or contain a translation to it.