<s:Button id="btnNext" label="Next" width="80"
click.Title="changeState('Info');"
click.Info="changeState('Organ');"
/>
如何在actionScript中动态更改“click.Title”事件?
btnNext.addEventListener(MouseEvent.CLICK, ????
答案 0 :(得分:0)
如下所示:
btnNext.addEventListener(MouseEvent.CLICK, onClick);
private function onClick(event:MouseEvent):void
{
switch (currentState)
{
case "Title":
changeState("Info");
break;
case "Info":
changeState("Organ");
break;
}
}
ActionScript中没有声明性状态支持。