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 thescriptslayer; 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 thescriptslayer 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 thelabelslayer; 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, 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access