home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Esportes
/
CrossingCup.swf
/
scripts
/
__Packages
/
EventCenter.as
< prev
next >
Wrap
Text File
|
2007-12-11
|
945b
|
38 lines
class EventCenter
{
function EventCenter()
{
this._eventSource = {};
mx.events.EventDispatcher.initialize(this._eventSource);
}
static function access()
{
if(EventCenter._instance == undefined)
{
EventCenter._instance = new EventCenter();
}
return EventCenter._instance;
}
function addEventListener(type, listener)
{
this._eventSource.addEventListener(type,listener);
}
function removeEventListener(type, listener)
{
this._eventSource.removeEventListener(type,listener);
}
function dispatchEvent(event)
{
this._eventSource.dispatchEvent(event);
}
function _dispatchEvent(event)
{
this._eventSource.dispatchEvent(event);
}
function broadcast(_type, _target, _data)
{
var _loc2_ = {type:_type,target:_target,data:_data};
this._eventSource.dispatchEvent(_loc2_);
}
}