Use LocalConnections : LocalConnection « Data Model « Flex






Use LocalConnections

Use LocalConnections
          

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
            import flash.net.LocalConnection;

            private var _localConnection:LocalConnection = new LocalConnection(  );

            private function sendMessage(event:MouseEvent):void {
                _localConnection.send("dataChannel", "displayMessage", message.text);
            }
      
    </mx:Script>
    <mx:VBox id="vbox">
        <mx:TextArea id="message" />
        <mx:Button click="sendMessage(event)" />
    </mx:VBox>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Method declared as public as it is exposed as a method to a local connection.