I don't really understand what you mean by : "PHP won't print it after I return AMF3 encoded binary."
However on the client (Royale) side, the toString method is the same as reading UTF encoded string from the BinaryData instance. The current version of mx.utils.ByteArray is not 'really' any different from org.apache.royale.utils.BinaryData for javascript. If you are expecting AMF3 encoded content then you probably want to decode it (using readObject()) with an org.apache.royale.net.remoting.amf.AMFBinaryData instance. Also, iirc org.apache.royale.net.URLLoader assumes the data result is text. You probably want a URLBinaryLoader instance instead I think, which would give you a org.apache.royale.utils.BinaryData instance from its data getter in the complete handler. if you are then expecting AMF3 content, then probably you could do something similar to what you are doing with 'ByteArray' but substituting AMFBinaryData instead, but you would not be using toString() in that case, you would more likely use readObject(). I am not sure about the endian-ness setting. On Mon, Jun 6, 2022 at 11:03 PM Yishay Weiss <[email protected]> wrote: > Is length being updated correctly? > > > > *From: *Jim McNamara <[email protected]> > *Sent: *Monday, June 6, 2022 5:55 AM > *To: *[email protected] > *Subject: *reading bytearray from php into actionscript > > > > Hi all- > > I searched the internet for this. > > I can't seem to get a string representation of the binary data passed back > from php_amf3. > > Please glance at the code and let me know if you have a tip. > > thanks for any tips! > jim > > > <fx:Script> > > > > <