if (image_index >= (image_number - 1)) { image_index = image_number - 1 image_speed = 0 }