<sect1 id="amf">
  <title>AMF Format</title>
  
  <para>
    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.
  </para>
  
  <para>
    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.
  </para>

  <para>
    The body of an AMF packet may look something like this
    example. The spaces have been added for clarity.
    
    <screen>
      02  0007 636f6e6e656374
    </screen>

    <variablelist>
      <varlistentry>
	<term>02</term>
	<listitem>
	  <para>
	    This is a single byte header. The value of the first 2
	    bits is 0x3, and the AMF index is also 0x3.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>0007</term>
	<listitem>
	  <para>
	    This is the length in bytes of the string.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>63 6f 6e 6e 65 63 74</term>
	<listitem>
	  <para>
	    This is the string. Note that there is no null terminator
	    since the length is specified.
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>

  </para>

<!--
  <para>
    These data types are used to exchange data between SWF
    movies. The data part of a message is one of the ActionScript data
    types.

    <variablelist>
      <varlistentry>
	<term>Byte</term>
	<listitem>
	  <para>
	    A single byte.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>Int</term>
	<listitem>
	  <para>
	    Two bytes (a short).
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>MediumInt</term>
	<listitem>
	  <para>
	    Three bytes.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>Long</term>
	<listitem>
	  <para>
	    Four bytes (an int).
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>Double</term>
	<listitem>
	  <para>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>UTF8</term>
	<listitem>
	  <para>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term></term>
	<listitem>
	  <para>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>LongUTF8</term>
	<listitem>
	  <para>
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>    
  </para>
-->

</sect1>
  
