Specifications

Chapter 26308
{pngFileName} is the output filename of a .png filename, which is expressed as a file://
URL. Optional.
{jpgFileName} is the output filename of a .jpeg filename, which is expressed as a file://
URL. Optional.
{movFileName} is the output filename of a QuickTime movie filename, which is expressed as
a file:// URL. Optional.
{generatorParams} is an array of strings that represents optional Generator command line
flags. Optional. Each flag must be followed in the array by its data items. Some commonly
used flags are listed in the following table.
Returns
A string that contains one of the following values:
"noError" means the call completed successfully.
"invalidTemplateFile" means the specified Template file is invalid or not found.
"invalidOutputFile" means at least one of the specified output filenames is invalid.
"invalidData" means that one or more of the templateParams is invalid.
"initGeneratorFailed" means Generator cannot be initialized.
"outOfMemory" means there is insufficient memory to complete the operation.
"unknownError" means an unknown error occurred.
Example
The following JavaScript creates a Flash Object file of type "myType", which replaces any
occurrence of "text" inside the Template file with "Hello World". It creates a .gif file as well as
an .swf file.
var params = new Array;
params[0] = "dwType";
params[1] = "myType";
params[2] = "text";
params[3] = "Hello World";
errorString = SWFFile.createFile( "file:///MyMac/test.swt", ¬
params, "file:///MyMac/test.swf", "file:///MyMac/test.gif");
Option Flag Data Description Example
-defaultsize Width, height Sets the output image size to the
specified width and height
"-defaultsize",
"640", "480"
-exactFit None Stretches the contents in the output
image to fit exactly into the specified
output size
"-exactFit"