
56
Chapter 11: Document object
Availability
Flash MX 2004.
Description
The Document object represents the Stage. That is, only FLA files are considered documents. To return the Document
object for the current document, use
fl.getDocumentDOM().
Method summary
You can use the following methods with the Document object:
Method Description
document.addDataToDocument() Stores specified data with a document.
document.addDataToSelection() Stores specified data with the selected object(s).
document.addFilter() Applies a filter to the selected objects.
document.addItem() Adds an item from any open document or library to the
specified Document object.
document.addNewLine() Adds a new path between two points.
document.addNewOval() Adds a new Oval object in the specified bounding rectangle.
document.addNewPrimitiveOval() Adds a new oval primitive fitting into the specified bounds.
document.addNewPrimitiveRectangle() Adds a new rectangle primitive fitting into the specified
bounds.
document.addNewPublishProfile() Adds a new publish profile and makes it the current one.
document.addNewRectangle() Adds a new rectangle or rounded rectangle, fitting it into the
specified bounds.
document.addNewScene() Adds a new scene (Timeline object) as the next scene after the
currently selected scene and makes the new scene the
currently selected scene.
document.addNewText() Inserts a new empty text field.
document.align() Aligns the selection.
document.allowScreens() Use this method before using the
document.screenOutline property.
document.arrange() Arranges the selection on the Stage.
document.breakApart() Performs a break-apart operation on the current selection.
document.canEditSymbol() Indicates whether the Edit Symbols menu and functionality are
enabled.
document.canRevert() Determines whether you can use the document.revert() or
fl.revertDocument() method successfully.
document.canSaveAVersion() Determines whether a version of the specified document can
be saved to the Version Cue server.
Commenti su questo manuale