Apache flex 如何获取Flex 4.5复选框以更改字符串值(文本)

Apache flex 如何获取Flex 4.5复选框以更改字符串值(文本),apache-flex,adobe,flex4.5,flexbuilder,Apache Flex,Adobe,Flex4.5,Flexbuilder,我想做的很简单,但似乎不起作用 我正在尝试获取一个复选框事件处理程序来更改字符串的文本值 protected function transport_yes_catching_bus_to_venue_checkbox_clickHandler(event:MouseEvent):void { if (transport_yes_catching_bus_to_venue_checkbox.selected==true) { totals_transport_I_catch_bus_to_venu

我想做的很简单,但似乎不起作用

我正在尝试获取一个复选框事件处理程序来更改字符串的文本值

protected function
transport_yes_catching_bus_to_venue_checkbox_clickHandler(event:MouseEvent):void
{
if (transport_yes_catching_bus_to_venue_checkbox.selected==true)
{
totals_transport_I_catch_bus_to_venue.text = "YES"
}
}
这是我在应用更改之前的标签

<s:Label id="totals_transport_I_catch_bus_to_venue"
includeIn="a13_summary_for_submission"
x="170" y="625" color="#3B70D1" text="-----"/>

如果已单击复选框,则将标签从“----”更改为“是”。否则标签将保持原样

运行应用程序时,无论复选框的状态如何,标签都不会更改

谢谢


<s:Label id="totals_transport_I_catch_bus_to_venue" includeIn="a13_summary_for_submission"
x="170" y="625" color="#3B70D1" text="{cbInput.selected?'YES':'-----'}" />

<s:CheckBox id="cbInput" />

您是否在事件处理程序中设置了断点以验证它是否正在实际执行?您是否正在使用Flash Player的调试版本来查看是否出现任何运行时错误?理论上,这应该是可行的,但为什么原始海报使用的方法不可行?