frame_count = map(x, 0, width, 0, number_of_frame)

Like by