Customizing the Actions Panel

I l @ ve RuBoard

The Actions panel takes up a good deal of room on your screen. You can resize the panel, collapse some of its panes, and make other adjustments. You can customize the way that scripts appear in the Script pane to make them appear in the smallest typeface you can read, for example (or, if you've spent long hours staring at tiny onscreen type, to make scripts display in nice large letters ). You can choose settings for font and type size ; you can set Flash to highlight different types of script elements in different colors; you can control the number of spaces Flash uses to indent with each tab you type; and you can turn on or off code hints.

To set preferences for the Actions panel:

  1. From the Edit menu (Mac OS 9 and Windows) or from the Flash menu (Mac OS X), choose Preferences.

    or

    From the Options menu in the top-right corner of the Actions panel, choose Preferences.

    The Preferences dialog box appears (Figure 12.5).

    Figure 12.5. In the Preferences dialog box, the ActionScript Editor tab contains settings for customizing the way Flash displays your scripts. You can also turn on code hintstooltips with explanations of items listed in the Actions Toolbox.

    graphics/12fig05.gif

  2. Click the ActionScript Editor tab.

    The various settings for working with statements in the Script pane of the Actions panel appear.

  3. Change any of the settings as described in the following exercises.

  4. Click OK.

    Flash applies your preferences settings immediately.

To get scripting help from code hints:

  1. Access the ActionScript Editor tab of the Preferences dialog box.

  2. In the Editing Options section, check the Code Hints checkbox.

  3. Move the lever of the Delay slider to set the amount of time your pointer must hover over an item before Flash displays the hint.

To choose the font for writing scripts:

  1. Access the ActionScript Editor tab of the Preferences dialog box.

  2. In the Text section, do the following:

    • From the pop-up menu of installed fonts, choose a font.

    • From the pop-up menu of sizes, choose a type size.

      The Actions panel can display scripts in text as small as 8 points and as large as 72 points.

Taming the Unwieldy ActionScript Panel

The Actions panel is quite large. You can resize and collapse the entire the panel as you would any other panel and dock it with other panelsor, in the Windows world, dock it to the application window. You can also resize or hide certain portions of the panel to keep the window more manageable. Try these techniques:

Resize the Actions Toolbox. Position the pointer to the right of the Actions Toolbox's scroll bar. The pointer changes to the double-headed arrow icon. Click and drag the edge of the Actions Toolbox to resize it.

Hide/show the Actions Toolbox. Click the triangle between the Actions Toolbox pane and the Script pane to close the toolbox completely. To show it again, click the triangle to the left of the Script pane.

Hide/show the information area. Click the triangle to the right of the Reference Book icon to toggle between showing and hiding the information that Flash provides about selected statements in Normal mode. This action doesn't change the size of the panel, but it does keep the panel from being so cluttered.

To color -code script items:

  1. Access the ActionScript Editor tab of the Preferences dialog box.

  2. Check the Syntax Coloring checkbox.

  3. From the pop-up sets of color swatches, choose new colors for the following:

    • Foreground. The basic text color for your scripts.

    • Background. The color against which your script displays in the Script pane.

    • Keywords. Words reserved for special purposes in ActionScript, such as var (which sets up local variables ).

    • Identifiers. The names of things, such as the names of objects, variables, and functions.

    • Comments. Text that Flash ignores when it reads the script; used to make notes about what's going on in the script.

    • Strings. Series of characters (letters, numbers , and punctuation marks).

graphics/01icon02.gif Tips

  • Flash's default settings for keywords, identifiers, and strings are all similar shades of blue. For these exercises, try setting them to wildly different colorssay, pink, orange, and brown. This technique will help you learn to recognize these different parts of ActionScript speech.

  • In addition to color-coding the various parts of speech in the Script pane, Flash color-codes problem areas of your script. Flash highlights syntax errors in red; deprecated actions (those whose use is being discouraged, and which may one day be phased out) appear in green. If you have set your publishing options to create .swf files for an earlier version of Flash Player, any actions introduced in Flash 6 that would break in the earlier Player appear in yellow in the Script pane.

  • You may want to color-code only certain parts of your scripts. If, for example, you want your comments to appear in a different color but nothing else, set the color boxes of Keywords, Identifiers, and Strings to match the color you choose for Foreground.


I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net