Flylib.com

Books Software

 
 
 

Adding Commands and Behaviors to Flash


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:

1.

Open up the History panel.

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

2.

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.

3.

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.

4.

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.

5.

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.



Where to Find Extensions

One of the best places (if not the best place) to find Flash extensions is at the Macromedia Exchange at www.macromedia.com/go/flash_exchange. Accessing the Exchange is easy. You can reach the site from Flash by selecting Help > Flash Exchange or by selecting Macromedia Flash Exchange from the Start page.

Extensions (including components , code snippets, or plug-ins) are created by Macromedia as well as members of the Flash community. Although many extensions are for sale, some are free. You will be are sometimes required to pay for extensions or components before you are allowed to download them, although this sometimes means that you get a higher-quality component or extension with some level of customer support as well. Some extensions are available from personal or commercial websites , blogs , or even forums.

Macromedia has published a list of companies that have created third-party extensions in the form of plug-ins for Flash 8 and earlier. A list of select companies offering plug-ins can be found at www.macromedia.com/software/flash/extensions. The extensions include plug-ins that create text effects, charts , image effects, and an extension that converts your 2D art and text into 3D animations.

Note

You can find a more detailed list of where to find third-party tools and extensions in Appendix B.


You can also find more commands on the Flash Exchange by choosing Commands > Get More Commands from the Command menu in Flash.