0 Replies Latest reply on Oct 21, 2008 4:07 PM by phil1943

    any Local Connection experts ?

    phil1943 Level 1
      Hello, has anyone used local connection between an AS2 SWF and a Flex 3 SWF ?
      I want the AS2 SWF to connect with the parent Flex 3 SWF and pass a variable. Are there any know issues ? I cant get mine to work.
      My AS2 SWF is embedded into a Flex 3 parent SWF via SWFLoader.
      Here is my AS2 sender SWF code:

      var senderLC = new LocalConnection();
      senderLC.send("fromFlash", "receiveData", selections );

      It is calling the function "receiveData" within the parent Flex 3 SWF and sending a string variable called selections.
      Here is my Flex 3 receiver SWF code.

      <mx:Script>
      <![CDATA[
      public function initApp() : void {
      import flash.net.LocalConnection;
      var receiverLC:LocalConnection = new LocalConnection();
      receiverLC.client = this;
      receiverLC.connect("fromFlash");
      }
      public function receiveData(incomingData:String):void {
      myTextArea.text = incomingData
      }
      ]]>
      </mx:Script