document.union()
#### Availability
Flash 8.
#### Usage
document.union()
#### Parameters
None.
#### Returns
None.
#### Description
Method; combines all selected shapes into a drawing object. If no objects are selected, calling this method results in an error and the script breaks at that point.
#### Example
The following example combines all selected shapes into a drawing object:
javascript
fl.getDocumentDOM().union();
#### See also
document.crop() (../Document_object/docume37.md), document.deleteEnvelope() (../Document_object/docume41.md), document.intersect() (../Document_object/docume97.md), document.punch() (../Document_object/docum230.md), shape.isDrawingObject (../Shape_object/shape6.md)