Flow of my program

Can you pease format your code by selecting it and clicking the following icon: </>.
You can edit your code by clicking the pen icon at the bottom right of your post.
Also, please read this thread for rules when posting on this forum: Guidelines—Tips on Asking Questions

Do you want to press only one time on the mouse and then it plays every scene automatically or you want to press on the mouse everytime you want to go to the next one?

I think you mean the second one so I’ll answer that one.
In order to do that you just need to have a variable to keep track on wich scen you are at.

int currentScene;

void setup() {
  size(500,500);
  currentScene = 0;
}

void draw() {

}

void ball1() {
...
}

void ball2() {
...
}

void ball3() {
...
}

void playScene(int nb) {
 if (nb ==1) {
   ball1();
 }

 if (nb ==2) {
   ball2();
 }

 if (nb ==3) {
   ball3();
 }
}

void mouseClicked() {
  currentScene++;
  if (currentScene > 3) {
    currentScene = 1;
  }
  playScene(currentScene);
}