flash object (fl)
243
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 the 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, 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.
var doc = fl.openDocument("file:///c|/Document.fla");
fl.openProject()
Availability
Flash MX 2004; return value changed in Flash 8.
Usage
fl.openProject(
fileURI
)
Summary of Contents for FLASH 8-EXTENDING FLASH
Page 1: ...Extending Flash...
Page 38: ...38 Top Level Functions and Methods...
Page 532: ...532 Objects...
Page 554: ...554 C Level Extensibility...