adds frame update when changing animation