actionscript-3encodingdeserializationamfphp

how is the data encoded when it is sent from amfphp to flash?


How is the data serialized/encoded when sent to flash?

or, 'how is the data encoded when it is sent from amfphp to flash?'


Solution

  • I was able to figure it out. It turns out AMF is a format - http://en.wikipedia.org/wiki/Action_Message_Format

    using these hex values

    Undefined - 0x00
    Null - 0x01
    Boolean False - 0x02
    Boolean True - 0x03
    Integer - 0x04
    Double - 0x05
    String - 0x06
    XML - 0x07
    Date - 0x08
    Array - 0x09
    Object - 0x0A
    XML End - 0x0B
    ByteArray - 0x0C
    

    there is a library here that can desierialize https://github.com/pwalczyszyn/amf-message-deserializer that converts it to an object readable by as3