Browsing the 2009 December archive
19:09 2009/12/13
I just discovered a really nice thing (thanks to Pernilla) using multiple conditions (&&, ||) in the if…else conditional statement in Actionscript. The thing I did not know (you probably did) is that the statement do not check the remaining conditions when a condition is not fulfilled. If you look at the image below you can see that we get a crash on line 32 but not on line 28. This is because we add a check to see if _userVO exists before we check the contents. We also get a crash on line 38 because we check the conditions in the wrong order.

This little tip will help me save some lines of code.

