Extending Flash |
|
|
|
| Objects > Document object > document.distribute() | |||
Flash MX 2004.
document.distribute(distributemode[,bUseDocumentBounds])
distributemode A string that specifies where to distribute the selected object. Acceptable values are "left edge", "horizontal center", "right edge", "top edge", "vertical center", and "bottom edge".
bUseDocumentBounds A Boolean value that, when set to true, distributes the selected objects using the bounds of the document. Otherwise, the method uses the bounds of the selected object. The default is false.
Nothing.
Method; distributes the selection.
The following example distributes the selected objects by the top edge:
fl.getDocumentDOM().distribute("top edge");
The following example distributes the selected objects by top edge and expressly sets the bUseDcoumentBounds parameter:
fl.getDocumentDOM().distribute("top edge", false);
The following example distributes the selected objects by their top edges, using the bounds of the document:
fl.getDocumentDOM().distribute("top edge", true);
document.getAlignToDocument(), document.setAlignToDocument()
|
|
|
|