User Guide

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