[code="java"]package tristanbf.cauc.events
{
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
public class GlobalDispacher extends EventDispatcher
{
private static var instance:GlobalDispacher;
public function GlobalDispacher(target:IEventDispatcher=null)
{
if(instance == null)
{
instance = this;
}
}
public static function getInstance():GlobalDispacher
{
if(instance == null)
{
instance = new GlobalDispacher();
}
return instance;
}
}
}
[/code]
Flex actionscript3.0 求大神讲解