Accessibility

Table of Contents

Creating a simple document in Flash CS4 Professional

Creating a FLA file and adding graphics

To build an application in Flash CS4 Professional, you create vector graphics and design elements with the drawing tools, and import additional media elements like audio, video, and images into your document. Next, you define how and when you want to use each of the elements to create the application you have in mind.

When you author content in Flash Professional, you work in a document called a FLA file. FLA files have the file extension .fla (FLA). While viewing a FLA file, you'll notice the Flash CS4 Professional user interface (see Figure 1) is divided into five main parts:

  • The Stage is where your graphics, videos, buttons, and so on appear during playback.
  • The Timeline controls the timing of when elements in the movie appear on the Stage. You also use the Timeline to specify the layering order of graphics on the Stage. Graphics in higher layers appear on top of graphics in lower layers.
  • The Tools panel holds the general set of tools used for selecting objects on the stage and drawing vector graphics.
  • The Property inspector displays editable information about any selected object.
  • The Library panel is where media elements and symbols are stored and organized.

. Flash CS4
Professional user interface is divided into five main parts

Figure 1. Flash CS4 Professional user interface is divided into five main parts

ActionScript code allows you to add interactivity to the media elements in your document. For example, you can add code that causes a button to display a new image when the user clicks it. You can also use ActionScript to add logic to your applications. Logic enables your application to behave in different ways depending on the user's actions or other conditions. Flash CS4 Professional uses ActionScript 3.0 when an ActionScript 3.0 or Adobe AIR file is created, or ActionScript 1.0 and 2.0 when an ActionScript 2.0 file is created.

Flash includes many features that make it powerful but easy to use, such as prebuilt drag-and-drop user interface components, built-in motion effects which you can use to animate elements on the Timeline, and special effects that you can add to media objects.

When you have finished authoring your FLA file, you publish it using the File > Publish command (Shift+F12). This creates a compressed version of your file with the extension .swf (SWF). You can then use Flash Player to play the SWF file in a web browser or as a stand-alone application.

Creating a simple FLA file

To illustrate the basic steps of creating any FLA document, this tutorial guides you through the process in a simple tutorial. This short tutorial is just a sample of the workflow you'll use while authoring in Flash Professional. The first step is to create a new document:

  1. Choose File > New.
  2. In the New Document dialog box, Flash File (ActionScript 3.0) is selected by default. Click OK.
  3. Click the workspace drop-down menu un the upper right of the screen and select the Essentials workspace layout option (see Figure 2).

    Choosing the
    Essentials option to see the workspace layout used by the tutorial

    Figure 2. Choosing the Essentials option to see the workspace layout used by the tutorial

  4. Click the Properties tab in the upper right side of the user interface to view the Stage properties for the file.
  5. In the Property inspector, located by default vertically along the right side of the workspace, the Size button displays the current Stage size setting as 550 × 400 pixels (see Figure 3). The Background color swatch is set to white. You can change the color of the Stage by clicking the swatch and selecting a different color.

    The Property inspector, showing the Stage size and background color.

    Figure 3. Property inspector showing the Stage size and background color

  6. Choose File > Save.
  7. Choose a location for the file on your hard disk, name the file SimpleFlash.fla, and then click Save. Remember this location, because you'll need to find this directory at the end of this tutorial.

Drawing a circle on the Stage

After you've created your document, you are ready to add some artwork for the document:

  1. Select the Oval tool from the Tools panel (see Figure 4).

    Oval tool in
the Tools panel

    Figure 4. Oval tool in the Tools panel

  2. Click the stroke color swatch in the Property inspector and select the No Color option from the Stroke Color Picker (see Figure 5).

    Selecting the
No Color option in the Stroke Color Picker

    Figure 5. Selecting the No Color option in the Stroke Color Picker

  3. Select a color of your choice from the Fill Color Picker, located directly below the Stroke Color Picker. Make sure the fill color contrasts well with the Stage color. In this example, we chose a blue fill color with a red Stage color.
  4. With the Oval tool still selected, draw a circle on the Stage by Shift-dragging on the Stage (see Figure 6). Holding the Shift key constrains the Oval tool to a circle.

    Circle drawn on
the Stage

    Figure 6. Circle drawn on the Stage