Name the current frame, for example 1, and name the frame you want to jump to 2
If you don’t know how to name it, just click on this frame. Press Ctrl F3, that is, change the frame label in the properties to the name.
After choosing a name, select your button, press F9 to open the action panel, and write the following code:
on
(release)
{
gotoAndPlay("2");
}