Hello, I had a good response on a problem from user jon_bla on a previous issue where he introduced me to using Boolean values.
My problem is that I want to use Boolean values to create functionality for buttons to allow the movie to skip to specified frames based on which button is pressed.
Currently I have three buttons.
Each button precedes a motion tween that continues for a few frames.
- I placed the Boolean var like jon_bla indicated on each button. Each button has the following code:
on(press){
gotoAndPlay(2);
var skip:Boolean = new Boolean();
skip=true;
}
-
The tween animation begins on frame 2 and ends on frame 10
-
On frame 10 I have the following code in the actions layer:
stop();
if(skip == true){
gotoAndPlay(21);
}
if(skip == true){
gotoAndPlay(28);
}
if(skip == true){
gotoAndPlay(35);
}
- Obviously, I realize that this code is incorrect. What I want to know is how to code each button on frame 1 to a different instance of a Boolean value. In other words, I want button 1 to take you to frame 21 after completing the tween, button 2 to take you to frame 28 after completing the tween, and button 3 to take you to frame 35 after completing the tween.
What is the syntax for naming and referencing a Boolean value?