Method declared as public as it is exposed as a method to a local connection.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
<mx:Script>
import flash.net.LocalConnection;
private var _localConnection:LocalConnection;
private function initializeHandler(event:Event):void {
_localConnection = new LocalConnection( );
_localConnection.connect("dataChannel");
_localConnection.client = this;
}
public function displayMessage(message:String):void {
output.text += message + "\n";
}
</mx:Script>
<mx:TextArea id="output" width="539" height="589"/>
</mx:Application>
Related examples in the same category