# AMF Format

The AMF format is used in the LocalConnection, SharedObject, NetConnection, and NetStream ActionScript classes. This is a means of binary data interchange between SWF movies, or between a SWF player and a SWF server.

Like the RTMP messages, an AMF packet header can be of a variable size. The size is either the same as the initial header of the RTMP message, or a 1 byte header, which is commonly used for streaming audio or video data.

The body of an AMF packet may look something like this example. The spaces have been added for clarity.

          02  0007 636f6e6e656374

02

- This is a single byte header. The value of the first 2 bits is 0x3, and the AMF index is also 0x3.

0007

- This is the length in bytes of the string.

63 6f 6e 6e 65 63 74

- This is the string. Note that there is no null terminator since the length is specified.