The Flash Objects API
65
■
"invalidData"
means that one or more of the
templateParams
name/value pairs is
invalid.
■
"initGeneratorFailed"
means the 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
occurrences of the string
"text"
inside the Template file with the string,
"Hello World"
. It
creates a GIF file as well as a 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");
SWFFile.getNaturalSize()
Description
This function returns the natural size of any Flash content.
Arguments
fileName
■
The
fileName
argument, which is expressed as a file:// URL, is a path to the Flash
content.
Returns
An array that contains two elements that represent the width and the height of the Flash
content or a
null
value if the file is not a Flash file.
000_DW_API_Print.book Page 65 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...