title: As3 - LocalConnection between SWF and AIR desktop app
body: <p>I need to send a text from an embedded SWF (Web browser) to an AIR based desktop app. 
  I did everything like explained in the <a href="http://help.adobe.com/de_DE/FlashPlatform/reference/actionscript/3/flash/net/LocalConnection.html" rel="nofollow">documentation</a> but I can't establish a connection.</p>
  
  <p>Does anybody see what I did wrong or can point me to a working example?</p>
  
  <p>From the SWF:</p>
  
  <pre><code>function startConnection(e:Event=null):void
  {
  var localConnection:LocalConnection 
  localConnection = new LocalConnection(); 
  
  localConnection.client = this; 
  localConnection.allowDomain("app#com.example.desktop"); 
  
  var textToSend = "Hello world! Source: http://www.foobar.com";
  localConnection.send("app#com.example.desktop:connectionName", "methodName",textToSend); 
  } 
  </code></pre>
  
  <p>From the AIR desktop app:</p>
  
  <pre><code> function onBrowserInvoke (event:BrowserInvokeEvent):void{
      var localConnection:LocalConnection 
      localConnection = new LocalConnection(); 
      localConnection.client = this
  
      localConnection.allowDomain("example.com");
      localConnection.connect("connectionName");
      } 
  </code></pre>
  
  <p>Thank you.
  Uli</p>