How to exit clip back to main project

I have a clip inside of my main project that ends with a button that I want to lead back to the first frame of the main project upon clicking. How would I go about accomplishing that?

if you are writing code inside a button which is inside a clip, you can use project.gotoAndStop(1), etc. to manage the main project’s timeline.*

*according to my memory