Organizing Actionscript In An Application - Adobe 38039481 - Flash CS3 Professional User Manual

User guide
Table of Contents

Advertisement

You can use several options to save a file: Save, Save As, and Save and Compact. When you save a file, Flash does not
analyze all the data before creating an optimized version of the document. Instead, the changes you make to the
document are appended to the end of the FLA file's data, which shortens the time it takes to save the document.
When you Save As, Flash writes a new and optimized version of the file, which results in a smaller file size. When
you Save and Compact, Flash creates a new optimized file (removing the undo history) and deletes the original file.
Important: If you select Save when working with a document, you can undo before that save point. Because Save and
Compact deletes the earlier version of the file and replaces it with the optimized version, you cannot undo earlier
changes.
If you are not using version control software to create backups of your FLA file, use Save As and type a new file name
for your document after every milestone in your project.
Many software packages allow users to use version control with their files, which enables teams to work efficiently
and reduce errors (such as overwriting files or working on old versions of a document). As with other documents,
you can use these programs to organize the Flash documents outside Flash.
See also
"Adobe Version Cue" on page 82
"Projects and version control guidelines" on page 472

Organizing ActionScript in an application

Keeping actions together
Whenever possible, put your ActionScript in a single location. Organizing your code in one place helps you edit
projects more efficiently, because you can avoid searching in different places when you debug or modify the Action-
Script. If you put code in a FLA file, put ActionScript on Frame 1 or Frame 2 in a layer called actions on the topmost
layer in the Timeline. Alternatively, you might put all of your code in ActionScript files. Some Flash applications do
not always put all code in a single place (in particular, ActionScript 2.0-based applications that use screens or
behaviors).
You can usually put all your code in the same location (on a frame, or in ActionScript files), with the following advan-
tages:
• Code is easy to find in a potentially complex source file.
• Code is easy to debug.
See also
"Attaching code to objects" on page 467
"Behaviors conventions" on page 467
"Using the MVC design pattern" on page 476
"Organizing files and storing code" on page 476
FLASH CS3
466
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents