MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 9

Extending flash
Table of Contents

Advertisement

Running JSFL files
There are several ways to run JSFL files. The most common ways are discussed in this section.
To run a script that is in the Commands folder, do one of the following:
Select Commands > Script Name.
Use a keyboard shortcut that you have assigned to the script. To assign a keyboard
shortcut, use Edit > Keyboard Shortcuts and select Drawing Menu Commands from the
Commands pop-up menu. Expand the Commands node in the menu tree to view a list of
available scripts.
To run a command script that is not in the Commands folder, do one of the
following:
From the authoring environment, select Commands > Run Command, and then select
the script to run.
From within a script, use the
From the file system, double-click the script file.
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
JSFL files" on page
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
function, which is documented in the ActionScript 2.0 Language Reference.
MMExecute()
However, the
MMExecute()
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:
Use the following syntax (you can concatenate several commands into one string):
MMExecute(Javascript command string);
You can also run a script from the command line.
fl.runScript()
7).
function has an effect only when it is used in the context of a
Overview of the Macromedia Flash JavaScript API
command.
"Saving
9

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents