Running JSFL files

There are several ways to run JSFL files. The most common ways are explained in this section.

To run a script that is in the Commands folder, do one of the following:

To run a command script that is not in the Commands folder, do one of the following:

To add a tool implemented in a JSFL file to the Tools panel:

  1. Copy the JSFL file for the tool and any other associated files to the Tools folder (see Saving JSFL files).
  2. Select Edit > Customize Tools Panel (Windows) or Flash > Customize Tools Panel (Macintosh).
  3. Add the tool to the list of available tools.
  4. Click OK.

You can add individual JavaScript API commands to ActionScript files by using the MMExecute() function, which is documented in the ActionScript 3.0 Language Reference. However, the MMExecute() function has an effect only when it is used in the context of a custom user-interface element, such as a component Property inspector, or a SWF panel within the authoring environment. Even if called from ActionScript, JavaScript API commands have no effect in Flash Player or outside the authoring environment.

To issue a command from an ActionScript script:

You can also run a script from the command line.

To run a script from the command line on Windows:

To run a script from the "Terminal" application on the Macintosh: