2008/06/07

dispatchEvent(event:Event)のオーバライドメモ

ふむふむ。

override public function dispatchEvent(event:Event):Boolean
{
var handlerName:String = event.type + "Handler";

if(this.hasOwnProperty(handlerName))
{
var method:Function = this[handlerName] as Function;
method.apply(this, [event.clone()]);
}
return super.dispatchEvent(event);
}

0 件のコメント: