2012-09-13 10:50 AM
There is no "else" in Flex.
Obviously some else-type logic is easily approximated by testing both the condition and its opposite:
<if name="myVar" equal="1">
<!-- do stuff -->
</if>
<if name="myVar" notequal="1">
<!-- do other stuff -->
</if>
But what about evaluations that don't have an opposite in Flex, like bitwise "and":
<if name="myVar" and="1">
That just takes a couple extra steps:
For example:
<assign name="check" value="0"/>
<if name="myVar" and="1">
<assign name="check" value="1"/>
<!-- do stuff -->
</if>
<if name="check" equal="0">
<!-- do other stuff -->
</if>