Add a delegate method called before flip animation

This is a quite simple patch that adds a delegate method called before the flip animation.