User Guide
164 Chapter 3: Objects
var fileURL = fl.browseForFileURL("open", "Select file");
var doc = fl.openDocument(fileURL);
fl.closeAll()
Availability
Flash MX 2004.
Usage
fl.closeAll()
Parameters
None.
Returns
Nothing.
Description
Method; closes all open documents, displaying the Save As dialog box for any documents that
were not previously saved. The method prompts the user, if necessary, but does not terminate the
application. See also
fl.closeDocument().
Example
The following code closes all open documents.
fl.closeAll();
fl.closeDocument()
Availability
Flash MX 2004.
Usage
fl.closeDocument( documentObject [, bPromptToSaveChanges] )
Parameters
documentObject
, [ bPromptToSaveChanges ]
documentObject A Document object. If documentObject refers to the active document, the
Document window might not close until the script that calls this method finishes executing.
bPromptToSaveChanges A Boolean value. If it is false, the user is not prompted if the
document contains unsaved changes; that is, the file is closed and the changes are discarded. If the
value is
true, and if the document contains unsaved changes, the user is prompted with the
standard yes-or-no dialog box. The default value is
true. This parameter is optional.
Returns
A Boolean value: true if successful; false otherwise.