its getting dark in my head.
i wanted to test my simple sprite animation system for my cards. i implemented a very early feature so that the cards, which are clicked rotate visually.
now to the problem:
my animation is based like this:
ImageLoader loads at the very beginning all necessary images and puts them in a container named AnimationStrip.
the AnimationStrip is nothing more than a linkedlist/vector which holds the image frames belonging to one animation.
most of them are single-framed strips.
every memory card gets the information, which index to use to get the suitable strip from the static Imagloader context. moreover every card has an animator objekt, which counts, which of the frame of a AnimationStrip should be drawn and what happens, if the strip ends (loop, keep on last whatever).
if you test the applet, you will notice the following bug:
the first card, which is clicked begins to rotate (for test reasons it wont stop rotating). but if you click a second one ther will occur an ArrayOutOfIndexException at a certain frame.
but dont see the mistake. if i print the index on monitor, which throws the exception, it is one, that is IN the bounds of my 12 frame animation.
it would be very usefull if someone looks at the source. perhaps im not seeing any trees although im standing in the wood...
btw.: there is a lot of scrap testing code. please overlook it. but im very interested if there are major concept mistakes ...