beautypg.com

Chapter 11: document object, Document object – Adobe Extending Flash Professional CS5 User Manual

Page 77

background image

55

Last updated 5/2/2011

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

” on page

135 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.canTestMovie()

Determines whether you can use the

document.testMovie()

method successfully.

This manual is related to the following products: