Fl.finddocumentindex(), Fl.findobjectindocbyname() – Adobe Extending Flash Professional CS5 User Manual
Page 255

233
EXTENDING FLASH PROFESSIONAL
flash object (fl)
Last updated 5/2/2011
var originalDocID = fl.getDocumentDOM().id;
// other code here, maybe working in different files
var targetDoc = fl.findDocumentDOM(originalDocID);
// Set the height of the Stage in the original document to 400 pixels.
targetDoc.height = 400;
See also
fl.findDocumentIndex()
Availability
Flash MX 2004.
Usage
fl.findDocumentIndex(name)
Parameters
name
The document name for which you want to find the index. The document must be open.
Returns
An array of integers that represent the position of the document name in the
fl.documents
array.
Description
Method; returns an array of integers that represent the position of the document name in the
fl.documents
array.
More than one document with the same name can be open (if the documents are located in different folders).
Example
The following example displays information about the index position of any open files named test.fla in the Output
panel:
var filename = "test.fla"
var docIndex = fl.findDocumentIndex(filename);
for (var index in docIndex)
fl.trace(filename + " is open at index " + docIndex[index]);
See also
fl.findObjectInDocByName()
Availability
Flash CS3 Professional.
Usage
fl.findObjectInDocByName(instanceName, document)