cheezy102
asked on
Why is this if statement not running? Flash CS4 - ActionScript 3.0
For some reason the if statement on line 75 is not running. bigButtonFront is definitely false (I have a trace statement elsewhere) and activePage is definitely not "info". Please help!
68 function onButtonOutInfo(ev:MouseEv ent):void
69 {
70 if(activePage == "info"){}
71 else
72 {
73 infoButtonSmall_mc.gotoAnd Play(11);
74
75 if(bigButtonFront = false)
76 {
77 infoBallBig_mc.gotoAndPlay (2);
78 bigButtonFront = true
79 trace(bigButtonFront)
80 }
81 }
82 }
68 function onButtonOutInfo(ev:MouseEv
69 {
70 if(activePage == "info"){}
71 else
72 {
73 infoButtonSmall_mc.gotoAnd
74
75 if(bigButtonFront = false)
76 {
77 infoBallBig_mc.gotoAndPlay
78 bigButtonFront = true
79 trace(bigButtonFront)
80 }
81 }
82 }
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"=" is an assignment operator, "==" is a comparison operator
i.e., if(A=false) is not a comparison operation. that is an assignment. you assign "false" to A.
if(A==false) is an comparison operation. (A==false) returns true or false.
i.e., if(A=false) is not a comparison operation. that is an assignment. you assign "false" to A.
if(A==false) is an comparison operation. (A==false) returns true or false.
ASKER
Thanks for the explanation!
ASKER
Great help
ASKER