Link to home
Start Free TrialLog in
Avatar of cheezy102
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:MouseEvent):void
69 {
70      if(activePage == "info"){}
71      else
72      {
73            infoButtonSmall_mc.gotoAndPlay(11);
74            
75            if(bigButtonFront = false)
76            {
77                  infoBallBig_mc.gotoAndPlay(2);
78                  bigButtonFront = true
79                  trace(bigButtonFront)
80            }
81      }
82 }
ASKER CERTIFIED SOLUTION
Avatar of grafinery
grafinery
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cheezy102
cheezy102

ASKER

Thanks man. What is the difference between = and ==?
"=" 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.
Thanks for the explanation!
Great help