![MACROMEDIA FLASH 8-EXTENDING FLASH Manual Download Page 228](http://html1.mh-extra.com/html/macromedia/flash-8-extending-flash/flash-8-extending-flash_manual_3348049228.webp)
228
Objects
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.
Description
Method; closes the specified document. See also
fl.closeAll()
.
Example
The following example illustrates two ways of closing a document.
// Closes the specified document and prompts to save changes.
fl.closeDocument(fl.documents[0]);
fl.closeDocument(fl.documents[0] , true); // Use of true is optional.
// Closes the specified document without prompting to save changes.
fl.closeDocument(fl.documents[0], false);
fl.closeProject()
Availability
Flash 8.
Usage
fl.closeProject()
Parameters
None.
Returns
A Boolean value of
true
if the project was successfully closed;
false
if there is no project
file open.
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...