begin, end and repeat events

Add a test that responds to begin, end and repeat events by starting new
animations.