Adobe 38040334 - Dreamweaver CS3 User Manual page 49

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

Advertisement

"initGeneratorFailed"
means there is insufficient memory to complete the operation.
"outOfMemory"
means an unknown error occurred.
"unknownError"
Example
The following JavaScript creates a Flash object file of type
inside the Template file with the string,
"text"
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");
SWFFile.getNaturalSize()
Description
This function returns the natural size of any uncompressed Flash content.
Arguments
fileName
• The
argument, which is expressed as a file:// URL, is a path to the Flash content.
fileName
Returns
An array that contains two elements that represent the width and the height of an uncompressed SWF file or a
value if the file is not an uncompressed SWF file.
SWFFile.getObjectType()
Description
This function returns the Flash object type; the value that passed in the
SWFFile.createFile()
Arguments
fileName
• The
argument, which is expressed as a file:// URL, is a path to a Flash Object file. This file is usually a
fileName
SWF file.
Returns
A string that represents the object type, or
Example
The following code checks to see if the test.swf file is a Flash object of type
means the Generator cannot be initialized.
"Hello World"
function created the file.
if the file is not a Flash Object file or if the file cannot be found.
null
, which replaces any occurrences of the string
"myType"
. It creates a GIF file as well as a SWF file.
parameter when the
dwType
:
myType
DREAMWEAVER CS3
44
API Reference
null

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents