set frame index to last frame after a click