Fl.runscript() – Adobe Extending Flash Professional CS4 User Manual
Page 270
248
EXTENDING FLASH CS4 PROFESSIONAL
flash object (fl)
Returns
A Boolean value of
true
if the document is successfully reverted;
false
otherwise.
Description
Method; if the file can be reverted, reverts the specified document to the version on the Version Cue server and logs
any errors to the Output panel.
To revert a document to the last version that was saved locally, use
.
Example
The following example reverts the current document to the version stored on the Version Cue server:
fl.revertDocumentToLastVersion(fl.getDocumentDOM());
See also
document.revertToLastVersion()
fl.synchronizeDocumentWithHeadVersion()
fl.runScript()
Availability
Flash MX 2004.
Usage
fl.runScript(fileURI [, funcName [, arg1, arg2, ...]])
Parameters
fileURI
A string, expressed as a file:/// URI, that specifies the name of the script file to execute.
funcName
A string that identifies a function to execute in the JSFL file that is specified in fileURI. This parameter is
optional.
arg
An optional parameter that specifies one or more arguments to be passed to funcname.
Returns
The function's result as a string, if funcName is specified; otherwise, nothing.
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: