source for undocumented JSFL commands?
Copy link to clipboard
Copied
I do plenty of JSFL work.
Often I come across blogs that mention 'undocumented' JSFL commands that turn out to be tremedously useful, such as:
document.convertSelectionToBitmap()
FLfile.runCommandLine(command)
therey are certainly not mentioned in the adobe PDF.
http://help.adobe.com/en_US/flash/cs/extend/flash_cs5_extending.pdf
Is there some actual source for these, or a special method of uncovering them?
Copy link to clipboard
Copied
Please?
Copy link to clipboard
Copied
If you work a lot with JSFL you should have a look into xJSFL
I used it a while ago for a project, and got the impression that its rather well documented.
Flash CS5+ uses the SpiderMonkey engine from Mozilla for his JS.
You should look on the projects homepage to get all the undocumented JSFL commands you can wish for...
Copy link to clipboard
Copied
I found a couple undocumented commands under the FLfile namespace this way:
- Find Adobe's install directory. Navigate to Adobe\Adobe Animate 2021\Common\Configuration\External Libraries. Depending on what year it is, the directory name will probably change, so watch out.
- Dump all text and read as UTF-16 LE. Sublime Text can do this.
- Using the Regular expression /[a-zA-z]+\b/ copy all the matched text into another file
- Format the matched strings as JS string literals, separated by commas, and make sure the last one doesn't have a comma (for the old JS syntax) e.g.
'A',
'B',
'CDE',
...etc.
'lastOne'
- Copy this into a JSFL file like so:
(function ()
{
var strings =
[
// Paste string literals here...
];
fl.outputPanel.clear();
strings.forEach(function (s)
{
if (typeof FLfile[s] === 'function')
fl.outputPanel.trace(s);
});
})();
- Run the command from Animate. This will dump all valid functions into the output window.
For the FLfile namespace, the following two are undocumented:
- readBinary
- runCommandLine - runs a CMD command. Does not output to output window, so you'll have to use temporary files to output things.

