refixed autoPlay, converted isAnimating from bool to int