Packageflash.net
Classpublic final class ObjectEncoding
InheritanceObjectEncoding Inheritance Object

The ObjectEncoding class allows classes that serialize objects (such as NetStream, NetConnection, SharedObject, and ByteArray) to interoperate with prior versions of ActionScript.

Object encoding controls how objects are represented in Action Message Format (AMF). Flash Player uses AMF to enable efficient communication between a Flash application and a remote server. AMF encodes remote procedure calls into a compact binary representation that can be transferred over HTTP/HTTPS or the RTMP/RTMPS protocol used by Flash Media Server. ActionScript objects and data values are serialized into this binary format, which is generally more compact than other representations, such as XML.

ByteArray, NetConnection, NetStream, SharedObject, Socket, and URLStream all contain an objectEncoding property that is assigned a constant from the ObjectEncoding class. The behavior of the objectEncoding property differs depending on the object; each class's objectEncoding property description explains the behavior more thoroughly.



Public Constants
 PropertyDefined by
  AMF0 : uint = 0
[static] Specifies that objects are serialized using the AMF format for ActionScript 1.0 and 2.0.
ObjectEncoding
  AMF3 : uint = 3
[static] Specifies that objects are serialized using the AMF format for ActionScript 3.0.
ObjectEncoding
  DEFAULT : uint = 3
[static] Specifies the default (latest) format for the current player.
ObjectEncoding
Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  dynamicPropertyWriter : IDynamicPropertyWriter
[static] Documentation is forthcoming.
ObjectEncoding
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods
 FunctionDefined by
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Constant detail
AMF0 constant
public static const AMF0:uint = 0

Specifies that objects are serialized using the AMF format for ActionScript 1.0 and 2.0.
AMF3 constant
public static const AMF3:uint = 3

Specifies that objects are serialized using the AMF format for ActionScript 3.0.
DEFAULT constant
public static const DEFAULT:uint = 3

Specifies the default (latest) format for the current player. Because object encoding control is only available in Flash Player 9 and later, the earliest format used will be the AMF format for ActionScript 3.0.

For example, if an object has the objectEncoding property set to flash.net.ObjectEncoding.DEFAULT, Flash Player uses AMF3 encoding. If, in the future, a later version of the Flash Player introduces a new AMF version and you republish your content, the player will use that new AMF version. You can use this constant only if you're not concerned at all about interoperability with previous versions of Flash Player.

Property detail
dynamicPropertyWriter property
dynamicPropertyWriter:IDynamicPropertyWriter  [read-write]

Documentation is forthcoming.

Implementation
    public static function get dynamicPropertyWriter():IDynamicPropertyWriter
    public function set dynamicPropertyWriter(value:IDynamicPropertyWriter):void




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/labs/flashauthoringpreview/flash/net/ObjectEncoding.html