On animation complete event

I have never once played around with Blender python scripts. But I am doing something in a PowerPoint presentation, using VBScript, and I thought “Blender might be better at this”.

Basically, I have an image of a ball, with a text attached (its position is based on the balls position).

I then animate the ball across the screen. When the animation completes, I change the number that the text is displaying, and restart the animation.

So what I am asking is not so much “How do I do this in Blender” but more of “Can it be done”, and if so I will just start down the path.