beautypg.com

Fl.quit() – Adobe Extending Flash Professional CS5 User Manual

Page 270

background image

248

EXTENDING FLASH PROFESSIONAL

flash object (fl)

Last updated 5/2/2011

Parameters

flaURI

A string, expressed as a file:/// URI, that specifies the path of the FLA file that should be silently published.

publishProfile

A string that specifies the publish profile to use when publishing. If this parameter is omitted, the

default publish profile is used.

Returns
Boolean

Description
Method; publishes a FLA file without opening it. This API opens the FLA in a headless mode and publishes the SWF
(or whatever the profile is set to). The second parameter (publishProfile) is optional. The return value is a boolean
indicating if the profile was found or not. In the case where the second parameter is not supplied, the return value is
always true.

Example
The following example prompts the user to select a FLA file and silently publishes it using the “Default” publish profile:

var uri = fl.browseForFileURL("select", "select a FLA file to publish");
var publishProfileName = "Default";
fl.publishDocument(uri, publishProfileName);

fl.quit()

Availability
Flash MX 2004.

Usage

fl.quit([bPromptIfNeeded])

Parameters

bPromptIfNeeded

A Boolean value that is

true

(default) if you want the user to be prompted to save any modified

documents. Set this parameter to

false

if you do not want the user to be prompted to save modified documents. In

the latter case, any modifications in open documents will be discarded and the application will exit immediately.
Although it is useful for batch processing, use this method with caution. This parameter is optional.

Returns
Nothing.

Description
Method; quits Flash, prompting the user to save any changed documents.

Example
The following example illustrates quitting with and without asking to save modified documents:

This manual is related to the following products: