66
Flash Integration
SWFFile.getObjectType()
Description
This function returns the Flash object type; the value that passed in the
dwType
parameter
when the
SWFFile.createFile()
function created the file.
Arguments
fileName
■
The
fileName
argument, which is expressed as a file:// URL, is a path to a Flash Object
file. This file is usually a SWF file.
Returns
A string that represents the object type, or
null
if the file is not a Flash Object file or if the file
cannot be found.
Example
The following code checks to see if the test.swf file is a Flash object of type
myType
:
if ( SWFFile.getObjectType("file:///MyMac/test.swf") == ¬
"myType" ){
alert ("This is a myType object.");
}else{
alert ("This is not a myType object.");
}
SWFFile.readFile()
Description
This function reads a Flash Object file.
Arguments
fileName
■
The
fileName
argument, which is expressed as a file:// URL, is a path to a Flash Object
file.
Returns
An array of strings where the first array element is the full path to the template SWT file. The
following strings represent the parameters (name/value pairs) for the object. Each name is
followed in the array by its value. The first name/value pair is
"dwType"
, followed by its value.
The function returns a
null
value if the file cannot be found or if it is not a Flash Object file.
000_DW_API_Print.book Page 66 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...