How do you get a True/False statement to be recognized inside a movie clip with a button on the main timeline as the control. I want my movie clip to stop at the last frame if the movie clip reaches the last frame. Otherwise gotoAndStop at the first frame of the clip. I was using
on (press) {
_root.m1.gotoAndPlay(2);
_root.m2.gotoAndPlay(1);
_root.m3.gotoAndPlay(1);
_root.m4.gotoAndPlay(1);
_root.m5.gotoAndPlay(1);
}
on (release) {
if (_root.m1.nFlag = false)) {
gotoAndStop(1);
} else {
gotoAndStop(50);
}
}
on (press) {
_root.m1.gotoAndPlay(2);
_root.m2.gotoAndPlay(1);
_root.m3.gotoAndPlay(1);
_root.m4.gotoAndPlay(1);
_root.m5.gotoAndPlay(1);
}
on (release) {
if (nFlag == true) {
_root.m1.gotoAndStop(50);
nFlag = false;
} else {
_root.m1.gotoAndStop(1);
}
}
I want it to play the movie clip as long as the person holds it, and if it reaches the last keyframe, then it plays a clip, and the person can let go, but if they let go before it reaches the last key frame, it goes to the beginning and stops.
What works:~: The false and the Else statement.
What does not work:~: It is not recognizing the True Statement, When you click and hold the button, It plays the loader, but when you let go, it goes back to one(which i want) and then it plays(which i Don't want). When it goes to frame 50, it is supposed to stop, but it goes back and stops on 1.