beautypg.com

Using behaviors consistently, Sharing files that use behaviors, Video conventions – Adobe Flash Professional CS3 User Manual

Page 476: About video conventions

background image

FLASH CS3

User Guide

470

Using behaviors consistently

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 appli-
cation, 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.

Video conventions

About video conventions

Many options are available to edit video before you import it into a FLA document, or load an FLV file into a SWF
file. Flash and Flash Video Encoder have greater controls for video compression. Compressing video carefully is
important because it controls the quality of the video footage and the size of the file. Video files, even when
compressed, are large in comparison with most other assets in your SWF file.

Note: Provide the user with control over the media in a SWF file. For example, if you add audio to a document with
video (or even a looping background sound), let the user control the sound.