beginners builders masters
 
SEARCH: webmonkey  the web

 
Shockwave/Flash
-------------------------
Print
this article for free. 
-------------------------

Overview

Lesson 1

Lesson 2

Lesson 3
1  Kiss and tellTarget
2 Importing Sound Files
3 Bring the Noise
4 Buttoning Up
5 For Those About to Rock ...

Lesson 4




Become a Flash 5 Master
Lesson 3

by Michael Kay

Page 1 — Kiss and tellTarget

In our first two lessons, you learned how to make a simple Flash movie. By now, you should know how to make shapes move and how to create a simple button. These basic elements are the bread and butter of Flash, and you can do a lot with them.

But if you want to create complex, interactive animations, you'll need to push your Flash skills even further. In this lesson, we'll concentrate on creating a fancy button that combines several features. (It morphs! It moves! It makes noise!) So let's get started.

The tellTarget action is a pretty straightforward concept: It tells another target symbol what to do. Actually making it happen, on the other hand, is a little more complicated.

The coolest thing about tellTarget is that it allows nonlinear interaction in your Flash movie. You can use it to start or stop a specific animation or force a symbol to jump to a specific frame. For example, say your movie is rolling. By using tellTarget, you can allow the user to turn a soundtrack on or off at any point, independent of the animation that's playing. Sound intriguing? Let's create this spontaneous soundtrack effect right now.

First, we need two different symbols: a button for initiating actions (the Tell part) and a Target symbol. Let's start with the Target symbol, which will contain the soundtrack and indicate the status of a Play/Stop button.

Symbol Properties

To begin, open the movie with the tween shape you created in the previous lesson. With nothing selected, create a blank symbol by choosing New Symbol from the Insert menu. Name it "Soundtrack." Before you click OK, assign the Movie Clip behavior to this symbol. A Movie Clip symbol will play independently of the movie that contains it, even if the movie has stopped, which is just what we want for the soundtrack. Don't worry: If you ever choose the wrong behavior, you can always redefine the symbol from the Properties menu via the Library panel.

You should now see a blank Timeline that corresponds to the Soundtrack symbol. But where's our sound? It looks as though we need to go get some! Let's explore our options on the next page.

next page»