Specifications

The Flash Objects API 309
SWFFile.getNaturalSize()
Description
Returns the natural size of any Flash movie.
Arguments
fileName
fileName
is a path to the Flash movie, which is expressed as a file:// URL.
Returns
An array that contains two elements that represent the width and the height of the movie or null
if the file is not a Flash file.
SWFFile.getObjectType()
Description
Returns the Flash object type; the value that passed in the dwType parameter when the file was
created by the
SWFFile.createFile() function.
Arguments
fileName
fileName is a path to a Flash Object file, which is expressed as a file:// URL. This file is usually
an .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 file, test.swf, 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
Reads a Flash Object file.
Arguments
fileName
fileName
is a path to a Flash Object file, which is expressed as a file:// URL.
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;
null is returned if the file cannot be found or if it is not a Flash Object file.