Skip to main content
Participant
March 23, 2021
Question

Back Button to Main Time Line

  • March 23, 2021
  • 1 reply
  • 137 views

Hi there…

I have the following problem: I have a simple infographic with multiple states on different keyframes in the Main Timeline. Each state is a separate movie clip. With a button click on frame 0 in the main timeline, I get to the next state with:

this.StartscreenPopUpButton_instance.addEventListener("click", fl_ClickToGoToAndStopAtFrame.bind(this));

function fl_ClickToGoToAndStopAtFrame()
{
this.gotoAndStop(1);
}

 

In this new State (inside the movieclip timeline) I have created a closebutton. When I click this button I want to go back to frame 0 in the maintimeline. The code from above does not work. 

 

Thanks a lot!!

 

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    March 23, 2021

    from a child (of the main timeline) movieclip timeline, use:

     

    this.parent.gotoAndStop(0);