I have issue on using "enabled" with j:Button
.
I know that I must add functionality with this bead :
<j:Button id="bp_next" text="Next" >
<j:beads>
<j:Disabled/>
</j:beads>
</j:Button>
But now I have the button showing disabled state.
How to change enabled/disabled with AS3 code as there is no enabled
property on j:Button
?
Regards
There are a couple of ways this can be achieved.
(bp_next.getBeadByType(Disabled) as Disabled).disabled = true|false;
or,
Disabled(bp_next.getBeadByType(Disabled)).disabled = true|false;
<j:Button localId="bp_next" text="Next" >
<j:beads>
<j:Disabled disabled="{someVariable}"/>
</j:beads>
</j:Button>
In AS3:
someVariable = true|false;
<j:Button localId="bp_next" text="Next" >
<j:beads>
<j:Disabled localId="bp_next_disabled"/>
</j:beads>
</j:Button>
In AS3:
bp_next_disabled.disabled = true|false;