fl.createProject()

Availability

Flash 8.

Usage

fl.createProject(fileURI [ , name ])

Parameters

fileURI A string, expressed as a file:/// URI, that specifies the name of the Flash Project (FLP) file to be created.

name An optional string that is displayed as the project name in the Project panel. If name is omitted, the name of the FLP file (excluding path or extension) is displayed in the Project panel.

Returns

A Project object if the method is successful; undefined if the file can't be created (for example, fileURI contains a directory that doesn't exist).

Description

Method; creates a Flash Project (FLP) file with the specified name. If the file can't be created, an informational dialog box is displayed. If the file already exists, a dialog box is displayed asking whether to overwrite the file.

Example

The following example creates a project file in the specified directory (if it exists) and specifies a name to display in the Project panel:

var myProject = fl.createProject("file:///C|/Projects/MasterProject_2005.flp", "Master Project");

See also

fl.getProject(), fl.openProject(), Project object