http://www.riaspace.com/2010/11/unframework-so-how-to-getaway-without-any-framework/で説明されているように、Global Event Dispatcher を使用することのデメリットは何ですか 。私は小さな(っぽい)アプリケーションだけに取り組んでいます。
// eventDispatcher.as script file
package
{
import flash.events.IEventDispatcher;
public function get eventDispatcher():IEventDispatcher
{
return _eventDispatcher;
}
}
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
var _eventDispatcher:IEventDispatcher = new EventDispatcher();
public class MyViewPM
{
public function btn_clickHandler():void
{
eventDispatcher.dispatchEvent(new MyEvent(MyEvent.EVENT_TYPE));
}
}