solMailBox is a swf-to-swf and swf-to-server communication system that facilitates async passing of messages. It works pretty much like email: participants can send messages which are then new / pending / read / deleted. A use case is when users of an e-learning AIR app, for instance, have the capacity to keep notes within the application. It would be inefficient to be constantly sending updates to the remote server.

SolMailBox keeps the notes locally at a short interval – 1 second, and a remote-connecting service grabs them periodically (1 minute) and sends them to the server. Saving locally ensures that if the user quits the program between 1 minute remote-saves their notes are saved locally and can be uploaded next time.

Sample

var solData:Object = {};                  
var mailMessageVO:MailMessageVO;  
var readMessages:Vector. = new [];

var iLength:uint = totalItems;

for (var i:int = 0; i < iLength; i++) {
  mailMessageVO = new MailMessageVO();
  mailMessageVO.body = "some text";
  mailMessageVO.id = i+1;
  mailMessageVO.link = (i+1) % 10;
  mailMessageVO.status = "READ";
  mailMessageVO.dateTimeStamp = new Date(); 
  readMessages[readMessages.length] = mailMessageVO;
}

solData.readMessages = readMessages;
solData.newMessages = new [];
Misc. URL.