ActionscriptにCircleButtonクラスがあります。誰かが外部から「on」プロパティを変更したのはいつか知りたいです。'onChange'を聴いてみましたが、そのイベントハンドラーにヒットすることはありません。
'on'プロパティをget/setterとして記述できることは知っていますが、[Bindable]を使用するだけの単純さが気に入っています。
オブジェクトはそれ自体のイベントをリッスンできませんか?
public class CircleButton extends UIComponent
{
[Bindable]
public var on:Boolean;
public function CircleButton()
{
this.width = 20;
this.height = 20;
graphics.beginFill(0xff6600, 1);
graphics.drawCircle(width/2, height/2, width/2);
graphics.endFill();
this.addEventListener(MouseEvent.ROLL_OVER, rollover);
this.addEventListener(MouseEvent.ROLL_OUT, rollout);
this.addEventListener('onChange', onOnChange);
}
private function onOnChange(event:PropertyChangeEvent):void {