home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 108
/
jogo-disk-108.iso
/
Games
/
Rabbit_Rivalry.swf
/
scripts
/
__Packages
/
smashing
/
keithm
/
Messenger.as
< prev
next >
Wrap
Text File
|
2010-05-15
|
807b
|
28 lines
class smashing.keithm.Messenger
{
function Messenger()
{
}
static function registerAddress(id, obj)
{
if(smashing.keithm.Messenger.__addresses == undefined)
{
smashing.keithm.Messenger.__addresses = {};
}
smashing.keithm.Messenger.__addresses[id] = obj;
}
static function removeAddress(id)
{
smashing.keithm.Messenger.__addresses[id] = "";
}
static function sendMessage(id, message, args)
{
if(smashing.keithm.Messenger.__addresses[id] != "" && smashing.keithm.Messenger.__addresses[id] != undefined)
{
smashing.keithm.Messenger.__addresses[id].onMessageReceived(message,args);
return undefined;
}
trace("[Messenger] Error locating message recipient " + id);
}
}