![MACROMEDIA FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY Manual Download Page 178](http://html1.mh-extra.com/html/macromedia/flash-mx-2004-flash-javascript-dictionary/flash-mx-2004-flash-javascript-dictionary_manual_3377988178.webp)
178
Chapter 3: Objects
Returns
If
funcName
is specified, returns the function's result as a string. Otherwise, nothing is returned.
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 drive C: 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
If you issue the following command:
fl.runScript("file:///C|/testScript.jsfl", "testFunct", 10, 1);
The following information appears in the Output panel:
in for loop i=0
in for loop i=1
end of for loop
in testFunct: 1st arg: 10 2nd arg: 1
You can also just call testScript.jsfl without executing a function:
fl.runScript("file:///C|/testScript.jsfl");
which produces the following in the Output panel:
in for loop i=0
in for loop i=1
end of for loop
fl.saveAll()
Availability
Flash MX 2004.
Usage
fl.saveAll()
Parameters
None.
Returns
Nothing.
Summary of Contents for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Page 1: ...Flash JavaScript Dictionary ...
Page 16: ...16 Contents ...
Page 40: ...40 Chapter 2 Top level functions ...
Page 368: ...368 Chapter 3 Objects ...