Adobe 38040334 - Dreamweaver CS3 User Manual page 48

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

SWFFile.createFile()
Description
This function generates a new Flash Object file with the specified template and array of parameters. It also creates a
GIF, PNG, JPEG, and MOV version of the title if filenames for those formats are specified.
If you want to specify an optional parameter that follows optional parameters that you do not want to include, you
need to specify empty strings for the unused parameters. For example, if you want to specify a PNG file, but not a
GIF file, you need to specify an empty string before specifying the PNG filename.
Arguments
templateFile, templateParams, swfFileName, {gifFileName}, {pngFileName}, {jpgFileName},
{movFileName}, {generatorParams}
• The
argument is a path to a template file, which is expressed as a file:// URL. This file can be a
templateFile
SWT file.
• The
argument is an array of name/value pairs where the names are the parameters in the SWT
templateParams
file, and the values are what you want to specify for those parameters. For Dreamweaver to recognize a SWF file
as a Flash object, the first parameter must be
the object type, such as
• The
argument, which is expressed as a file:// URL, is the output filename of an SWF file or an empty
swfFileName
string to ignore.
• The
argument, which is expressed as a file:// URL, is the output filename of a GIF file. This
gifFileName
argument is optional.
• The
argument, which is expressed as a file:// URL, is the output filename of a PNG file. This
pngFileName
argument is optional.
• The
argument, which is expressed as a file:// URL, is the output filename of a JPEG file. This
jpgFileName
argument is optional.
• The
argument, which is expressed as a file:// URL, is the output filename of a QuickTime file. This
movFileName
argument is optional.
• The
generatorParams
This argument is optional. Each flag's data items must follow it in the array. Some commonly used flags are listed
in the following table:
Option Flag
Data
Width, height
-defaultsize
None
-exactFit
Returns
A string that contains one of the following values:
means the call completed successfully.
"noError"
"invalidTemplateFile"
"invalidOutputFile"
means that one or more of the
"invalidData"
"dwType"
.
"Flash Text"
argument is an array of strings that represents optional Generator command line flags.
Description
Sets the output image size to the specified
width and height
Stretches the contents in the output image
to fit exactly into the specified output size
means the specified template file is invalid or not found.
means at least one of the specified output filenames is invalid.
templateParams
. Its value should be a string that represents the name of
Example
"-defaultsize",
"640", "480"
"-exactFit"
name/value pairs is invalid.
DREAMWEAVER CS3
43
API Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents