Package pyamf :: Module amf0 :: Class ASTypes

[hide private]
[frames] | no frames]

# Class ASTypes

source code

The AMF/RTMP data encoding format constants.

See Also: Data types on OSFlash (external)

Class Variables | [hide private]

| NUMBER = `0` Represented as 9 bytes: 1 byte for `0×00` and 8 bytes a double representing the value of the number.
| BOOL = `1` Represented as 2 bytes: 1 byte for `0×01` and a second, `0×00` for `False`, `0×01` for `True`.
| STRING = `2` Represented as 3 bytes + len(String): 1 byte `0×02`, then a UTF8 string, including the top two bytes representing string length as a `int`.
| OBJECT = `3` Represented as 1 byte, `0×03`, then pairs of UTF8 string, the key, and an AMF element, ended by three bytes, `0×00` `0×00` `0×09`.
| MOVIECLIP = `4` MovieClip does not seem to be supported by Remoting.
| NULL = `5` 1 single byte, `0×05` indicates null.
| UNDEFINED = `6` 1 single byte, `0×06` indicates null.
| REFERENCE = `7` When an ActionScript object refers to itself, such `this.self = this`, or when objects are repeated within the same scope (for example, as the two parameters of the same function called), a code of `0×07` and an `int`, the reference number, are written.
| MIXEDARRAY = `8` A MixedArray is indicated by code `0×08`, then a Long representing the highest numeric index in the array, or 0 if there are none or they are all negative.
| OBJECTTERM = `9`
| ARRAY = `10` An array is indicated by `0x0A`, then a Long for array length, then the array elements themselves.
| DATE = `11` Date is represented as `00x0B`, then a double, then an `int`.
| LONGSTRING = `12` LongString is reserved for strings larger then 2^16 characters long.
| UNSUPPORTED = `13` Trying to send values which don’t make sense, such as prototypes, functions, built-in objects, etc.
| RECORDSET = `14` Remoting Server -> Client only.
| XML = `15` The XML element is indicated by `00x0F` and followed by a LongUTF containing the string representation of the XML object.
| TYPEDOBJECT = `16` A typed object is indicated by `0×10`, then a UTF string indicating class name, and then the same structure as a normal `0×03` Object.
| AMF3 = `17` An AMF message sent from an AVM+ client such as the Flash Player 9 may break out into AMF3 mode.

Class Variable Details | [hide private]

### MOVIECLIP

MovieClip does not seem to be supported by Remoting. It may be used by other AMF clients such as SharedObjects.

Value:

      4

### MIXEDARRAY

A MixedArray is indicated by code `0×08`, then a Long representing the highest numeric index in the array, or 0 if there are none or they are all negative. After that follow the elements in key : value pairs.

Value:

      8

### OBJECTTERM

See Also: OBJECT

Value:

      9

### ARRAY

An array is indicated by `0x0A`, then a Long for array length, then the array elements themselves. Arrays are always sparse; values for inexistant keys are set to null (`0×06`) to maintain sparsity.

Value:

      10

### DATE

Date is represented as `00x0B`, then a double, then an `int`. The double represents the number of milliseconds since 01/01/1970. The `int` represents the timezone offset in minutes between GMT. Note for the latter than values greater than 720 (12 hours) are represented as 2^16 - the value. Thus GMT+1 is 60 while GMT-5 is 65236.

Value:

      11

### LONGSTRING

LongString is reserved for strings larger then 2^16 characters long. It is represented as `00x0C` then a LongUTF.

Value:

      12

### UNSUPPORTED

Trying to send values which don’t make sense, such as prototypes, functions, built-in objects, etc. will be indicated by a single `00x0D` byte.

Value:

      13

### RECORDSET

Remoting Server -> Client only.

See Also:
  RecordSet, RecordSet structure on OSFlash (external)

Value:

      14

### XML

The XML element is indicated by `00x0F` and followed by a LongUTF containing the string representation of the XML object. The receiving gateway may which to wrap this string inside a language-specific standard XML object, or simply pass as a string.

Value:

      15

### TYPEDOBJECT

A typed object is indicated by `0×10`, then a UTF string indicating class name, and then the same structure as a normal `0×03` Object. The receiving gateway may use a mapping scheme, or send back as a vanilla object or associative array.

Value:

      16

### AMF3

An AMF message sent from an AVM+ client such as the Flash Player 9 may break out into AMF3 mode. In this case the next byte will be the AMF3 type code and the data will be in AMF3 format until the decoded object reaches it’s logical conclusion (for example, an object has no more keys).

Value:

      17