Accessibility

Using Flash for the first time—Part 2: Adding symbols, animation, and ActionScript


Table of Contents

Using symbols

A symbol is an object that you create in Flash. As you discovered in Part 1, a symbol can be a graphic, button, or movie clip that you reuse throughout the current FLA or other FLA files. Any symbol that you create is automatically added to the document's library (Window > Library), so you can use it many times within a single FLA file.

When you add animation, you should always animate symbols in Flash instead of animating raw graphics (graphics that you draw) or raw assets that you import (such as a PNG file). For example, if you draw a circle using the Oval tool in Flash, you should convert that circle graphic into a movie clip before you animate it. This helps you reduce the SWF file size and makes it easier to create an animation in Flash.

In Part 1 of this tutorial, you created a graphic symbol when you imported the join_us.ai file into Flash. In this tutorial, you want to animate that symbol; therefore, you need to change it to a movie clip symbol, which has a timeline. In the following exercise, you convert a graphic symbol to a movie clip symbol in the following exercise. You will animate this movie clip in later exercises.

  1. Delete the join_us graphic symbol from the Stage.
  2. In the Library panel, select the join_us graphic symbol, and then right-click (or option-click) the instance.
  3. Select Type and then Movie Clip from the context menu to change what type of symbol it is.

    The icon that represents what type of symbol it is change from graphic symbol icon to a movie clip icon.

    Convert to Symbol

    Figure 4: Use the Convert to Symbol dialog box to convert selected content into a symbol, give it a name, and add it to the document's library.

  4. Drag and position a new instance of the join_us movie clip symbol on the Stage.

Remember that the symbol's name (in the library) is different than its instance name (on the Stage) because you can have numerous instances of a single symbol on the Stage. For example, you can set an instance name for the join_us symbol using the Property inspector after you drag it to the Stage from the Library panel. If you drag another instance of join us to the Stage, you assign it a different instance name. You use the instance name in your ActionScript to reference and manipulate the instance with code, and there are some naming guidelines you must follow when you assign an instance name. (I'll discuss these later in this tutorial, in the section called Writing simple ActionScript).

Movie clip symbols have their own timelines. This means you can animate each movie clip instance on its own timeline, and on the main Timeline of the document. This is unique to movie clip instances. You will animate the movie clip in the following exercise.