Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Creative Suite

  • Print
  • + Share This
  • 💬 Discuss
This chapter is from the book

Animated Buttons and the Movie Clip Symbol

Animated buttons display an animation in any of the first three keyframes (Up, Over, and Down) of the button symbol. A button can spin when the pointer rolls over it, for example, because you have an animation of a spinning graphic in the Over state. How do you fit an animation into only one keyframe of the button symbol? Use a movie clip.

A movie clip is a special kind of symbol that allows you to have animations that run regardless of where they are or how many actual frames the instance occupies. This feature is possible because a movie clip’s Timeline runs independently of any other Timeline, including other movie clip Timelines and the main movie Timeline in which the movie clip resides. This independence means that as long as you establish an instance on the Stage, a movie clip animation plays all its frames regardless of where it is. Placing a movie clip instance in a single keyframe of a button symbol makes the movie clip play whenever that particular keyframe is displayed. That is the basis of an animated button.

An animation of a butterfly flapping its wings, for example, may take ten frames in a movie clip symbol. Placing an instance of that movie clip on the Stage in a movie that has only one frame still lets you see the butterfly flapping its wings circle-a.jpg. This functionality is useful for cyclical animations that play no matter what else may be going on in the current timeline. Blinking eyes, for example, can be a movie clip placed on a character’s face. No matter what the character does—whether it’s moving or static in the current timeline—the eyes blink continuously.

To create a movie clip

  1. Choose Insert > New Symbol.

    The Create New Symbol dialog box appears.

  2. Type a descriptive name for your movie clip symbol, choose Movie Clip as the Type, and click OK circle-b.jpg.

    You now enter symbol-editing mode.

  3. Create the graphics and animation on the movie clip timeline circle-c.jpg.

    Notice how the navigation bar above the Timeline tells you that you’re currently editing a symbol.

  4. Return to the main Stage.

    Your movie clip is stored in the Library as a symbol, available for you to bring onto the Stage as an instance circle-d.jpg.

To create an animated button

  1. Create a movie clip symbol that contains an animation, as described in the preceding task.
  2. Create a button symbol, and define the four keyframes for the Up, Over, Down, and Hit states circle-e.jpg.
  3. In symbol-editing mode, select either the Up, Over, or Down state for your button, depending on when you would like to see the animation.
  4. Drag your movie clip symbol from the Library to the Stage circle-f.jpg.

    The movie clip instance is inside the button symbol.

  5. Return to the main movie Timeline, and drag an instance of your button symbol to the Stage.
  6. Choose Control > Test Movie > in Flash Professional.

    Your button instance plays the movie clip animation continuously as your pointer interacts with the button circle-g.jpg.

  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus