Several Customers in the Early Adopter Program have asked me if two Flex applications running on the same machine can communicate with each other The answer is yes:. The LocalConnection class allows a Flex application to send data to- and trigger events in another Flex application running On The Same Machine. Here Is A Simple Example: 1. "Sending" Application (Run It!) XML Version = "1.0" Encoding = "UTF-8"?>
myConnection = new LocalConnection (); Create an instance of the LocalConnection class myConnection.onStatus = mx.utils.Delegate.create (this, onStatus); The onStatus event is triggered after the send () method is invoked to allow you to respond to the success or failure of the operation myConnection.send ( "receivingapp", "messagePosted", myMessage.text); "reveivingapp" is the name the receiving app used to connect "messagePosted" is the event to trigger in the receiving applicationmyMessage.text Is The Data To Pass To The Receiving Application. You CAN Pass Objects or Multiple CommA-Separated Values.2. "Receiving" Application
Run it!)
XML Version = "1.0" encoding = "UTF-8"?>
Code highlights