Coding Navigation between Scenes

My scenes link together via arrow buttons that the user has to click.


Coding is needed so that each time the user clicks a button on a specific scene the next scene is played correctly.

When this button (NextScene1_btn) is pressed the event listener understands that an event has taken place and if this button is clicked then the function 'Scene1' is played and the scene goes to and plays Scene 1.

function Scene1(event: MouseEvent){
gotoAndPlay("Scene 1");
}

NextScene1_btn.addEventListener(MouseEvent.CLICK, Scene1);

Comments

Popular posts from this blog

Unity Project 4: Ball platformer game

Reflective Post

[Research] Traditional Poster Design (4CTA1214)