The Actions Panel

The Actions panel is where you can manually type in ActionScript. To access the Actions panel, choose Window>Actions (F9).

The Actions panel, as seen in Figure 8.7, has three main sections:

  • The Actions window. This is where you will type in your ActionScript code.

  • The quick reference. This holds all the snippets of code in a categorized hierarchical format. To choose a code, find the one you want and double-click it, or click and drag it into the Actions window.

  • Go to Action window. This window acts like a small Windows Explorer panel for finding actions anywhere in the Flash movie. To go to one, simply map to it and click on it, and the Actions window will go to that frame of object.

Figure 8.7. The Actions panel.

Those are the three main sections of the Actions panel. You can close and resize them with the small arrows on their sides.

The main Actions window of the Actions panel is where all of your actions will be. It has several buttons across the top, and their functions are as follows:

  • Add Script. This button, when clicked, will show a drop-down menu with the same categories as the quick reference. You can map to a specific action, and select it for it to appear in the Actions window.

  • Find. This button, when clicked, will open the Find dialog box, as shown in Figure 8.8, for finding specific sections or words in your ActionScript and replacing them if necessary.

    Figure 8.8. The Find dialog box for finding words in ActionScript.

  • Insert Target Path. This opens the Insert Target Path dialog box, shown in Figure 8.9, which is used to map to individual objects on the stage from within ActionScript.

    Figure 8.9. The Insert Target Path dialog box for helping to map to specific objects on the stage in ActionScript.

  • Check Syntax. This will quickly check your code for basic errors.

  • Auto Format. This button will turn on and off the Auto Format features of the Actions panel.

  • Show Code Hints. This button will turn on and off the code-hinting features of the Actions panel.

  • Debug Options. Used in debugging ActionScript (for more on debugging, see Chapter 17, "Debugging").

  • Script Assist. For those who worked in "Normal Mode" back in Flash MX or before, this button might be a welcome feature return. When clicked, this button will activate the Script Assist area in the Actions panel like Figure 8.10. The Script Assist section will help you with some of your code by giving fields and options for methods and functions so you don't have to memorize as much or look things up as often.

    Figure 8.10. The Script Assist section of the Actions panel is there to help users by simply filling in field elements instead of typing them in the Actions panel directly.

  • Reference. This button will launch the Help Panel and map to highlighted code for easy search.


The Script Assist will be a helpful feature to those who are new to code, or do not like to type the code in directly, however, when activated, the Script Assist will not allow you to type in the Actions panel at all, you will have to turn it off to return to full Expert Mode.

A nice feature in the Actions panel is the ability to pin multiple scripts. This is very useful in that you can select multiple frames and objects containing ActionScript at once and simply choose the corresponding tab at the bottom of the Actions panel to move between them. To pin a script, follow these steps:


Choose a frame or object containing ActionScript so that the code will display in the Actions panel.


Select the icon of a pushpin in the bottom left corner of the Actions panel or go to the Actions panel Options menu and chose Pin Script.


Now you will see a corresponding tab at the bottom of the Actions panel that you can select at any time to return to the actions of that specific frame or object.

There are several options that you can change with the Actions panel to help developers program better. The first is the Auto Format Options found in the Preferences window (Edit, Preferences), as seen in Figure 8.11. This will help in setting rules for things such as line spacing with brackets, spacing with operators, and other visual aspects of coding. You can select each of the options to see what it would look like in the Preview window. And you can always select the Reset to Defaults button to return to default settings.

Figure 8.11. Use the Auto Format Options to make changes in the layout of auto formatted code.

There are also a few options in the Options drop down in the top right of the Actions panel:

  • Escape-Shortcut Keys. Shortcut keys are used to shorten the number of keystrokes necessary to place an action in the Actions panel.

  • Hidden Characters. A new feature to Flash 8, when activated, this option will turn on hidden characters to appear in ActionScript like spaces. You can see an example in Figure 8.12.

    Figure 8.12. You can see the difference in these two images of the Actions panel. The one on the right has hidden characters turned on.

  • Line Numbers. This will display line numbers on the left side of the Actions window, which makes it easier to track down malfunctioning code.

  • Word Wrap. A new feature to Flash MX 2004; you can now wrap your code to the next line without errors occurring. This is a very useful feature if you do not have a lot of screen room.

Another place where you can make changes to the layout of the Actions panel is the preferences for the Actions panel.

Macromedia Flash Professional 8 Unleashed
Macromedia Flash Professional 8 Unleashed
ISBN: 0672327619
EAN: 2147483647
Year: 2005
Pages: 319 © 2008-2017.
If you may any questions please contact us: