Sharing files that use behaviors – Adobe Flash Professional CC 2014 v.13.0 User Manual
Page 855

Use behaviors consistently throughout a document when they are your main or only source of ActionScript. Use behaviors when you have little or
no additional code in the FLA file, or have a consistent system in place for managing the behaviors that you use.
If you add ActionScript to a FLA file, put code in the same locations where behaviors are added, and document how and where you add code.
For example, if you place code on instances on the Stage (object code), on the main Timeline (frame scripts), and also in external AS files,
examine your file structure. Your project will be difficult to manage if you have code in all of these places. However, if you logically use behaviors
and structure your code to work in a particular way surrounding those behaviors (place everything on object instances), at least your workflow is
consistent. The document will be easier to modify later.
Sharing files that use behaviors
If you plan to share your FLA file with other users and you use ActionScript placed on or inside objects (such as movie clips), it can be difficult for
those users to find your code’s location, even when they use the Movie Explorer to search through the document.
Document the use of behaviors if you are working with a complex document. Depending on the size of the application, create a flow chart, list, or
use good documentation comments in a central location on the main Timeline.
If you are creating a FLA file with code placed in many locations throughout the document and plan to share the file, leave a comment on Frame 1
on the main Timeline to tell users where to find the code and how the file is structured. The following example shows a comment (on Frame 1) that
tells users the location of the ActionScript:
/*
ActionScript placed on component instances and inside movie clips using behaviors.
Use the Movie Explorer to locate ActionScript
*/
Note: This technique is not necessary if your code is easy to find, the document is not shared, or all of your code is placed on frames of the main
Timeline.
848