reset frameIndexOnInitialPlay and changed variable name to _toggle