system
January 21, 2002, 8:57pm
1
I am using the following if statement but each time the statement is called it changes the variable “status” to 2 regardless. If the status is 1 going into the frame that contains this statement it is changed to 2.
if (status = 2) {
        _root.step.gotoAndStop(630);
        _root.step.back.gotoAndPlay(“loop”);
} else {
        gotoAndPlay(2);
}
Any help is appreciated.
Thanks!
system
January 21, 2002, 9:02pm
2
you must use double = , as in (status==2), else you’re not checking status, but setting it to 2!
simple as that
system
January 21, 2002, 9:03pm
3
… but it seems to me that the problem happened when you declared what the variable was equal to.
Can I see the script for that part?
system
January 21, 2002, 9:08pm
4
Nope, “if (status = 2)” will set status to 2 every time the if statement is entered!
system
January 21, 2002, 9:13pm
5
That did the trick!! thanks!!
Here is the correctd script.
if (status == 2) {
        _root.step.gotoAndPlay(630);
        _root.step.back.gotoAndPlay(“loop”);
} else {
        gotoAndPlay(2);
}
system
January 21, 2002, 9:16pm
6
If you are wondering what I am working on here ya go.
I call it my virtual Escalator.
www.jaycook.net/escalator
I am an engineer for an escalator company. I am trying to get the escalator to run up and down. Well thanks to your help it will.
system
January 21, 2002, 9:18pm
7
Pfft. You think you’re so great just because you noticed there was only one equals sign.
… Jerk.
… Maudit…
… Hey, I never noticed before that the french word for “Dammit” is “Bad Word”! (Well, “Bad Say”, to translate litteraly.) Heh. How clever.
system
January 21, 2002, 10:34pm
8
Ohhh…so you’re insulting me? P’tit con va!
I hope you’ll understand i’m only joking, was grinning when writing this, jus’ a lil’ fun, okiedokie?