code for doing stuff on animation start/stop