Hello,
Here is an example using frameCount and case statements:
https://discourse.processing.org/t/animation-that-transitions-using-framecount/15378
https://processing.org/reference/case.html
https://processing.org/reference/switch.html
https://processing.org/reference/draw_.html
https://processing.org/reference/frameRate_.html
https://processing.org/reference/frameCount.html
:)