Skip to main content
Participant
July 4, 2018
Answered

Button insise Movie Clip

  • July 4, 2018
  • 1 reply
  • 193 views

Hy!
So i made navigation with movie clip and inside are buttons.

And now I want to go with buttons to the other scenes.

I use Code Snipets but I dont know where to paste.

When I put the code inside the button he always go back to the first scene and that is not a scene i want to.

btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_14);

function fl_ClickToGoToScene_14(event:MouseEvent):void

{

    MovieClip(this.root).gotoAndPlay(1, "Scene 3");

}

he always go back to Scene 1.

Can someone help me please?

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

Is the Scene 3 the last one and does it have only one frame?

If both are true, what will happen is that you won't be able to see the frame 1 of the Scene 3 because you'll go back to the first scene, as you are using gotoAndPlay.

1 reply

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
July 5, 2018

Hi.

Is the Scene 3 the last one and does it have only one frame?

If both are true, what will happen is that you won't be able to see the frame 1 of the Scene 3 because you'll go back to the first scene, as you are using gotoAndPlay.