The Document object
An important property of the top-level flash object is the
property.) The
fl.documents
objects that each represent one of the FLA files currently open in the authoring environment.
The properties of each Document object represent most of the elements that a FLA file can
contain. Therefore, a large portion of the DOM is composed of child objects and properties
of the Document object. For more information, see
To refer to the first open document, for example, use the statement
. The first document is the first Flash document that was opened during
fl.documents[0]
the current session in the authoring environment. When the first opened document is closed,
the indexes of the other open documents are decremented.
To find a particular document's index, use
or fl.findDocumentIndex(nameOfDocument)
To access the document that is currently focused, use the statement
flash.getDocumentDOM()
latter is the syntax used in most of the examples in this document.
To find a particular document in the
each document for its
All the objects in the DOM that aren't listed in the previous table (see
Object Model" on page
the library of a document, you use the
object:
fl.getDocumentDOM().library
To access the array of items in the library, you use the
in the array is an Item object:
fl.getDocumentDOM().library.items
To access a particular item in the library, you specify a member of the
fl.getDocumentDOM().library.items[0]
In other words, the library object is a child of the Document object, and the Item object is a
child of the library object. For more information, see
, and
library.items
fl.documents
or
fl.getDocumentDOM()
fl.documents
property
document.name
14) are accessed from the Document object. For example, to access
document.library
Item
object.
fl.documents
property contains an array of Document
Document
flash.findDocumentIndex(nameOfDocument)
. See
fl.findDocumentIndex()
. See
fl.getDocumentDOM()
array, iterate through the array and test
See
.
fl.documents
property, which retrieves a library
library.items
document.library
The Flash Document Object Model
property. (See
object.
flash.documents[0]
.
. The
and
document.name
"The Flash Document
property; each element
library.items
,
library
object,
or
.
array:
15
Need help?
Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?
Questions and answers