Adding Commands and Behaviors to Flash

Commands are used to repeat tasks numerous times. You can download commands from the Flash Exchange or create them yourself by saving steps from the History panel. Commands and behaviors can be installed using the Extension Manager as well.

You can also create your own custom commands very easily by following these steps:


Open up the History panel.

Choose Window > Other Panels > History to open the History panel.


Do a common task in Flash.

A common task might be creating an actions layer. Do anything that is registered by the History panel and that you might want to repeat as some kind of task in Flash.


Select the steps that should be saved as the command in the History panel.

These steps will be reproduced when you choose to run the command.


Within the History panel, Right-click (or Control-click on the Mac) and choose Save As Command from the contextual menu.

A dialog box appears and prompts you for a name for this command.


Assign a name to the command.

You can replay the command after you have assigned a name to it. All you need to do is select the command name from the Commands menu or Commands > Run Command from the main menu. If you choose the latter, the Open dialog box pops open, and you need to select a specific command to run from the hard drive. Commands are saved as Flash JavaScript files and have a JSFL extension. If you create your own custom commands using the History panel, the JSFL file will most likely be saved to the following directory: C:\Documents and Settings\<USERNAME>\ Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Commands (or <username>\Library\Application Support\Macromedia\Flash 8\en\ Configuration\Commands on a Mac).

Behaviors are used to make your SWF files more interactive without having to write ActionScript code yourself in the Flash authoring environment, and you have used many of them throughout the exercises in this book. You can install a behavior using the Extension Manager or place it directly in a folder on the hard drive. Place the behavior in the following folder: C:\Documents and Settings\<USERNAME>\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Behaviors (or <username>\Library\Application Support\Macromedia\Flash 8\Configuration\ Behaviors on the Mac). After you put a behavior in the Behaviors folder, you need to restart Flash or choose Reload from the Options menu in the Behaviors panel. To delete a behavior, you need to delete the behavior's XML file from the user's folder above.

Macromedia Flash 8. Training from the Source
Macromedia Flash 8: Training from the Source
ISBN: 0321336291
EAN: 2147483647
Year: 2004
Pages: 230
Authors: James English © 2008-2017.
If you may any questions please contact us: