setInterval Question!

Hi all!

I have made a flash that goes to the next frame every 5 seconds. When it reaches the last frame it won’t go to the beginning, how do I make it so?

Thanks in advance!