Adobe Flash Player supports an accelerated method of reading and writing to the ByteArray object, known as "domain memory"

The Memory API provides access to domain memory using Memory.select on an existing ByteArray on the Flash target, and falls back to standard access on other targets.

Static methods

staticinlinegetByte(position:Int):Int

Get a byte from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

An 8-bit integer value

staticinlinegetDouble(position:Int):Float

Get a double from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

A 64-bit floating point value

staticinlinegetFloat(position:Int):Float

Get a float from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

A 32-bit floating-point value

staticinlinegetI32(position:Int):Int

Get an int from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

A 32-bit integer value

staticinlinegetUI16(position:Int):Int

Return an unsigned int from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

An unsigned 16-bit integer value

staticselect(byteArray:ByteArray):Void

Selects the ByteArray to use for subsequent domain memory access

Parameters:

byteArray

A ByteArray object to use for memory

staticinlinesetByte(position:Int, v:Int):Void

Set a byte at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

An 8-bit byte value

staticinlinesetDouble(position:Int, v:Float):Void

Set a double at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

A 64-bit floating-point value

staticinlinesetFloat(position:Int, v:Float):Void

Set a float at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

A 32-bit floating-point value

staticinlinesetI16(position:Int, v:Int):Void

Set an int at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

A 16-bit integer value

staticinlinesetI32(position:Int, v:Int):Void

Set a long int at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

A 32-bit integer value