Package pyamf :: Module amf3 :: Class ASTypes
[hide private]
[frames] | no frames]

Class ASTypes

source code

All AMF3 data types used in ActionScript 3.0.

AMF represents ActionScript objects by a single byte representing type, and then by a type-specific byte array that may be of fixed length, may contain length information, or may come with its own end code.


See Also: AMF3 data types on OSFlash (external)

Class Variables [hide private]
  UNDEFINED = 0
The undefined type is represented by the undefined type marker.
  NULL = 1
The undefined type is represented by the undefined type marker.
  BOOL_FALSE = 2
The false type is represented by the false type marker and is used to encode a Boolean value of false.
  BOOL_TRUE = 3
The true type is represented by the true type marker and is used to encode a Boolean value of true.
  INTEGER = 4
In AMF 3 integers are serialized using a variable length unsigned 29-bit integer.
  NUMBER = 5
This type is used to encode an ActionScript Number or an ActionScript int of value greater than or equal to 2^28 or an ActionScript uint of value greater than or equal to 2^29.
  STRING = 6
ActionScript String values are represented using a single string type in AMF 3 - the concept of string and long string types from AMF 0 is not used.
  XML = 7
ActionScript 3.0 introduced a new XML type however the legacy XMLDocument type from ActionScript 1.0 and 2.0.is retained in the language as flash.xml.XMLDocument.
  DATE = 8
In AMF 3 an ActionScript Date is serialized simply as the number of milliseconds elapsed since the epoch of midnight, 1st Jan 1970 in the UTC time zone.
  ARRAY = 9
ActionScript Arrays are described based on the nature of their indices, i.e.
  OBJECT = 10
A single AMF 3 type handles ActionScript Objects and custom user classes.
  XMLSTRING = 11
ActionScript 3.0 introduces a new top-level XML class that supports E4X syntax.
  BYTEARRAY = 12
ActionScript 3.0 introduces the ByteArray type to hold an Array of bytes.
Class Variable Details [hide private]

UNDEFINED

The undefined type is represented by the undefined type marker. No further information is encoded for this value.

Value:
0

NULL

The undefined type is represented by the undefined type marker. No further information is encoded for this value.

Value:
1

BOOL_FALSE

The false type is represented by the false type marker and is used to encode a Boolean value of false. No further information is encoded for this value.

Note: In ActionScript 3.0 the concept of a primitive and Object form of Boolean does not exist.

Value:
2

BOOL_TRUE

The true type is represented by the true type marker and is used to encode a Boolean value of true. No further information is encoded for this value.

Note: In ActionScript 3.0 the concept of a primitive and Object form of Boolean does not exist.

Value:
3

INTEGER

In AMF 3 integers are serialized using a variable length unsigned 29-bit integer.

Value:
4

NUMBER

This type is used to encode an ActionScript Number or an ActionScript int of value greater than or equal to 2^28 or an ActionScript uint of value greater than or equal to 2^29. The encoded value is is always an 8 byte IEEE-754 double precision floating point value in network byte order (sign bit in low memory). The AMF 3 number type is encoded in the same manner as the AMF 0 Number type.

Value:
5

STRING

ActionScript String values are represented using a single string type in AMF 3 - the concept of string and long string types from AMF 0 is not used. Strings can be sent as a reference to a previously occurring String by using an index to the implicit string reference table. Strings are encoding using UTF-8 - however the header may either describe a string literal or a string reference.

Value:
6

XML

ActionScript 3.0 introduced a new XML type however the legacy XMLDocument type from ActionScript 1.0 and 2.0.is retained in the language as flash.xml.XMLDocument. Similar to AMF 0, the structure of an XMLDocument needs to be flattened into a string representation for serialization. As with other strings in AMF, the content is encoded in UTF-8. XMLDocuments can be sent as a reference to a previously occurring XMLDocument instance by using an index to the implicit object reference table.

Value:
7

DATE

In AMF 3 an ActionScript Date is serialized simply as the number of milliseconds elapsed since the epoch of midnight, 1st Jan 1970 in the UTC time zone. Local time zone information is not sent.

Value:
8

ARRAY

ActionScript Arrays are described based on the nature of their indices, i.e. their type and how they are positioned in the Array.

Value:
9

XMLSTRING

ActionScript 3.0 introduces a new top-level XML class that supports E4X syntax. For serialization purposes the XML type needs to be flattened into a string representation. As with other strings in AMF, the content is encoded using UTF-8.

Value:
11

BYTEARRAY

ActionScript 3.0 introduces the ByteArray type to hold an Array of bytes. AMF 3 serializes this type using a variable length encoding 29-bit integer for the byte-length prefix followed by the raw bytes of the ByteArray.

Value:
12