
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Externalizing ActionScript Code
|
407
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 timeline panel so that its code executes after all other layers have loaded
(or at the bottom if you set your Load Order to Top Down). Keeping the scripts
layer in the same place makes your code easy to find. (We saw in 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 pop-up Options menu 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 exter-
nal files. See the next section, “Externalizing ActionScript Code” for details.
• To save typing, use the shortcut keys provided for Actions; for example, use
Esc+G+P for gotoAndPlay(). Shortcut sequences are listed under the plus (+)
button in the Actions panel.
• Notice that the Toolbox is resizable. To save ...