document.distributeToLayers()

#### Availability

Flash MX 2004.

#### Usage

document.distributeToLayers()

#### Parameters

None.

#### Returns

Nothing.

#### Description

Method; performs a distribute-to-layers operation on the current selection—equivalent to selecting Distribute to Layers. This method displays an error if there is no selection.

#### Example

javascript
The following example distributes the current selection to layers:
fl.getDocumentDOM().distributeToLayers();