2 Replies Latest reply on Feb 2, 2011 12:23 AM by gayathri_

    Sending a file between AIR applications using local connection

    gayathri_

      How do i send a text file between air applications using local connection?

       

      Sender AIR

      conn.send("app#Receiver:MyConnection", "FileHandler",filename);

       

      Receiver AIR

      public function FileTransferHandler(myFile:File):void
                  {
                     
                      trace("File received");
                      trace(MyFile.size);
                  }

       

      It gives the following error


                  Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.LocalConnection was unable to invoke callback FileHandler. error=TypeError: Error #1034: Type Coercion failed: cannot convert Object@83d6791 to flash.filesystem.File.