add this function to the main timeline
Code:
//variable is written to by each button in the menu MC
iWantTogoTo="";
function whereToGo () {
if (iWantTogoTo == "sceneTwo") {
gotoAndPlay ("Scene 2", 1);
//you will need to write more else iff statements if you have more buttons
} else if (iWantTogoTo == "sceneOne") {
gotoAndPlay ("Scene 1", 1);
}
}
add this to your buttons:
button1
Code:
on (release){
_root.iWantTogoTo="sceneTwo";
_root.WhereToGo();
}
button 2
Code:
on (release){
_root.iWantTogoTo="sceneOne";
_root.WhereToGo();
}
etc