16.6. Productivity
Here
are some tips to streamline
ActionScript source code authoring:
Keep all timeline scripts on an independent layer called
scripts. Do not place any content on the
scripts layer; use it exclusively for code.
Store this layer at the top of your layer structure so that its code
executes after all other layers have loaded (or at the bottom if you
set your Load Order to Top Down). If you always keep the
scripts layer in the same place, it's easy
to find your code. (We know from the previous section how valuable
that can be!) Keep all frame labels on an independent layer called
labels. Do not place any content on the
labels layer; use it exclusively for frame
labels. Take a look under the arrow button in the top-right corner of the
Actions panel. You'll find handy tools such as search and
replace, source code printing, and Script pane font control. When working with code libraries used on multiple projects, save code
in external files. See Section 16.7, "Externalizing ActionScript Code", for details. To save typing, use the shortcut keys provided for Actions (for
example, Esc- G-P for gotoAndPlay( ) ). Shortcut
sequences are listed under the plus (+) button in the Actions panel. Reconfigure the Actions panel to place it with the other code-centric
panels: Instance, Frame, and Text Options. Simply open up any panel
under Window Panels, and then drag the Actions panel onto it. Notice that the Toolbox is resizable. To save space while coding, you
can hide the Toolbox, partially or completely, by dragging the border
between the Toolbox and the Script pane.
| | | 16.5. Where's All the Code? | | 16.7. Externalizing ActionScript Code |
Copyright © 2002 O'Reilly & Associates. All rights reserved.
|
|