MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 248

Extending flash
Table of Contents

Advertisement

Example
The following example reverts the current FLA document to its last saved version; any
changes made since the last save are lost.
fl.revertDocument(fl.getDocumentDOM());
fl.runScript()
Availability
Flash MX 2004.
Usage
fl.runScript( fileURI [, funcName [, arg1, arg2, ...] ])
Parameters
A string, expressed as a file:/// URI, that specifies the name of the script file
fileURI
to execute.
A string that identifies a function to execute in the JSFL file that is specified in
funcName
. This parameter is optional.
fileURI
An optional parameter that specifies one or more arguments to be passed to
arg
Returns
The function's result as a string, if
Description
Method; executes a JavaScript file. If a function is specified as one of the arguments, it runs
the function and also any code in the script that is not within the function. The rest of the
code in the script runs before the function is run.
Example
Suppose there is a script file named testScript.jsfl in the root directory on the C drive, and its
contents are as follows:
function testFunct(num, minNum) {
fl.trace("in testFunct: 1st arg: " + num + " 2nd arg: " + minNum);
}
for (i=0; i<2; i++) {
fl.trace("in for loop i=" + i);
}
fl.trace("end of for loop");
// End of testScript.jsfl
248
Objects
is specified; otherwise, nothing.
funcName
.
funcname

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents