I learned how to use simple boolean values and define many of them in one movie as separate variables from jon_bla and glosrfc. Thank you to those two again.
I am missing one portion of the puzzle now in order to know how to make this style of dynamic movie menu work.
-
I have 3 buttons on frame 1, each one pertaining to a Boolean value.
-
The code on each button is:
//button 1
on(press){
gotoAndPlay(2);
var skip1:Boolean = new Boolean();
skip1=true;
}
//button2
on(press){
gotoAndPlay(2);
var skip2:Boolean = new Boolean();
skip2=true;
}
//button3
on(press){
gotoAndPlay(2);
var skip3:Boolean = new Boolean();
skip3=true;
}
-
There is a tween from frame 2 through frame 8
-
On frame 8 there is the following code:
stop();
if(skip1 == true){
gotoAndPlay(15);
}
if(skip2 == true){
gotoAndPlay(22);
}
if(skip3 == true){
gotoAndPlay(29);
}
- I have another set of code I don’t need to describe later in the movie that brings the movie back to frame 1.
The problem is, once button 2 and therefore skip2 has been activated, if I attempt to click on button 1 after that, the movie still activates the Boolean value skip2. The same thing happens if I activate skip3, except now the movie activates skip3 no matter which button is pressed.
My question is, how do I reset the movie’s recognition of the satisfied conditions for the Boolean values? How can I make it think no Boolean variables have been activated once it is set back to frame 1 without having to reload the movie entirely?