First we create a Sprite Object named
sceneButtons and choose our button graphics as two animations.
Now we drag the button twice into our scene and change the Animation in the Properties Manager
to 1 for one of them.
We create a global variable with the name
currentScene and the default value
1.
Then an mouse click event for our button and two sub-events with the object-variable
button, to check which button was pressed.
The action adds or subtracts a number for the scene name.
The second condition deactivates the button when we have reached the first or last scene.
Now we give our buttons variable the value left / right in the Properties Manager.
To change the scene, we add a third sub-event. We fill the scene-variable
newScene with the name
we want to change to and use it in the Change the scene action.
With these two events we can hide one button when we are in the first or last scene.