Skip to main content
Participant
August 7, 2012
Question

source for undocumented JSFL commands?

  • August 7, 2012
  • 3 replies
  • 5116 views

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?

This topic has been closed for replies.

3 replies

Inspiring
July 17, 2021

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.
Inspiring
January 9, 2013

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...

Participating Frequently
December 22, 2012

Please?