Skip to content
Simple cross plat global messaging/event broadcast
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Simple cross plat global messaging/event broadcast, with a few optional data fields and delayed dispatch.

import com.furusystems.messaging.Message;
import com.furusystems.messaging.MessageData;
import com.furusystems.messaging.Messaging;
class Tests 
  	static var myMessage:Message = new Message(); //predefined message type
		public function new() 
			Messaging.addCallback([myMessage], myMessageCallback); //create a listener for a message type
			Messaging.send(myMessage, "foo", this, 2); //In two seconds, send a message of the type myMessage, with the data "foo", with a pointer to this
		function myMessageCallback(m:MessageData):Void 
			trace("Message received");
			m.message; //the message type (useful for switches); //The message data (in this example, "foo")
			m.source; //The message origin (in this example, "this")
You can’t perform that action at this time.