I want to bind in actionscript a boolean with a condition. This is possible in mxml but how can this be done on actionscript?
Example:
.mxml binding:
enabled={(A_changed || B_changed || C_changed || D_changed) && rs.selectedIndex !=-1}/>
.as binding:
BindingUtils.bindProperty(this.myBtn,'enabled',????);
Thanks,
Dave
There is no lazy solution to your issue – the Flex compiler is doing a lot of transformations in the MXML bindings, which aren’t available in vanilla AS3. You’ll have to attach BindingUtils.bindSetter to all of the properties. Something like: