title: LocalConnection In AS3
body: <p>I'm trying to use LocalConnection in AS3 between two AS3 movies (made in CS5) but it doesn't seem to be working, here is the current code (each in frame1 (the only frame) of each movie on layer 1 (the only layer))</p>
  
  <p>Sender:</p>
  
  <pre><code>import flash.external.ExternalInterface;
  import flash.net.LocalConnection;
  
  function sendtoview(con,val):String {
  //create local connection for sending text
  var sending_lc:LocalConnection = new LocalConnection();
  //put text from input into a var
  sending_lc.addEventListener(StatusEvent.STATUS, err);
  //send through specified connection, call specified method, send specified parameter
  ExternalInterface.call("alert('Sending...')");
  sending_lc.send("xivioview", "recieveText", val);
  return "kk"
  }
  
  function err(msg) {
      ExternalInterface.call("alert('" + msg + "')");
  }
  
  ExternalInterface.addCallback("sendtoview", sendtoview);
  ExternalInterface.call("alert('Loaded')");
  </code></pre>
  
  <p>Note that I know the JavaScript connection to the ExternalInterface does work, I've tested it.</p>
  
  <p>Receiver:</p>
  
  <pre><code>import flash.external.ExternalInterface;
  import flash.net.LocalConnection;
  
  var mLocalConnection:LocalConnection = new LocalConnection();
  mLocalConnection.connect("xivioview");
  mLocalConnection.client=this;
  
  function recieveText(textRecieved:String) {
  ExternalInterface.call("alert('Received!')");
  ExternalInterface.call(textRecieved);
  };
  
  
  
  ExternalInterface.call("alert('Loaded')");
  </code></pre>
  
  <p>If you don't want to fix my code I'd still be happy with a working simple example (i've searched google for hours, none seem to be easy or simple.).</p>