beautypg.com

Fl.objectdrawingmode, Fl.opendocument() – Adobe Extending Flash Professional CS5 User Manual

Page 265

background image

243

EXTENDING FLASH PROFESSIONAL

flash object (fl)

Last updated 5/2/2011

fl.objectDrawingMode

Availability
Flash 8.

Usage

fl.objectDrawingMode

Description
Property; a Boolean value that specifies whether the object drawing mode is enabled (

true

) or the merge drawing

mode is enabled (

false

).

Example
The following example toggles the state of the object drawing mode:

var toggleMode = fl.objectDrawingMode;

if (toggleMode) {

fl.objectDrawingMode = false;

} else {

fl.objectDrawingMode = true;

}

fl.openDocument()

Availability
Flash MX 2004.

Usage

fl.openDocument(fileURI)

Parameters

fileURI

A string, expressed as a file:/// URI, that specifies the name of the file to be opened.

Returns
The

Document object

for the newly opened document, if the method is successful. If the file is not found or is not a

valid FLA file, an error is reported and the script is cancelled.

Description
Method; opens a Flash document (FLA file) for editing in a new Flash Document window and gives it focus. For a user,
the effect is the same as selecting File

> Open and then selecting a file. If the specified file is already open, the window

that contains the document comes to the front. The window that contains the specified file becomes the currently
selected document.

Example
The following example opens a file named Document.fla that is stored in the root directory on the C drive. The code
stores a Document object representing that document in the

doc

variable and sets the document to be the currently

selected document. That is, until focus is changed,

fl.getDocumentDOM()

refers to this document.

This manual is related to the following products: