simple animation by switching frames after a delay