Document.crop(), Document.currentpublishprofile – Adobe Extending Flash Professional CS4 User Manual
Page 108

86
EXTENDING FLASH CS4 PROFESSIONAL
Document object
Returns
An object for the newly created symbol, or
null
if it cannot create the symbol.
Description
Method; converts the selected Stage item(s) to a new symbol. For information on defining linkage and shared asset
properties for a symbol, see
Example
The following examples create a movie clip symbol with a specified name, a button symbol with a specified name, and
a movie clip symbol with a default name:
newMc = fl.getDocumentDOM().convertToSymbol("movie clip", "mcSymbolName", "top left");
newButton = fl.getDocumentDOM().convertToSymbol("button", "btnSymbolName", "bottom right");
newClipWithDefaultName = fl.getDocumentDOM().convertToSymbol("movie clip", "", "top left");
document.crop()
Availability
Flash 8.
Usage
document.crop()
Parameters
None.
Returns
A Boolean value:
true
if successful;
false
otherwise.
Description
Method; uses the top selected drawing object to crop all selected drawing objects underneath it. This method returns
false
if there are no drawing objects selected or if any of the selected items are not drawing objects.
Example
The following example crops the currently selected objects:
fl.getDocumentDOM().crop();
See also
,
,
document.currentPublishProfile
Availability
Flash MX 2004.