[ Pobierz całość w formacie PDF ]
Integrating Sound
chapter
12
6
Press + ( + ) to open
the Library panel if it is not
already open.
6
You can also open the Library by
clicking
Window
, and then
Library
.
7
Click on your sound file in the
Library.
7
l
Your sound waveform appears as
a preview.
8
Click the
Play
button ( ).
Flash plays your sound.
8
Will a sound file make my Flash
movie’s file size huge?
It depends. Short interface sounds
are fairly lightweight, while long
audio loops and MP3 song files can
be very large. You can compress
the audio in your project by right-
clicking on your sound symbol
and then clicking
Properties
. The
Properties inspector has options for
compressing your audio.
What kinds of
audio files can
Flash import?
Flash supports
several sound
formats, including
MP3, AIFF, WAV,
AU, Adobe Sound
Document, and
SDII.
M
P
3
A
U
AIFF
S
D
I
I
265
Add Event Sounds
to the Timeline
You can add event sounds
when you have sounds that
are dependent on animations
or sounds that you want to
trigger when you reach a
particular frame of the
Timeline.
Add Event Sounds to the Timeline
1
Insert a blank keyframe where
you want your sound to begin.
See Chapter 7 to learn how to
insert keyframes.
1
2
Open the Properties inspector.
3
Under the Sound section, click
the
Name
menu.
4
Click your sound to select it.
2
3
4
266
Integrating Sound
chapter
12
l
A sound wave appears in the
Timeline.
5
Click
Control
.
6
Click
Test Movie
.
You can also press
5
+
6
(+
.
Flash tests your movie.
What do the Sync options do?
Event
always plays a sound in its entirety, independent of whether the Timeline stops
or changes frames.
Start
sync does almost exactly the same thing as an Event sound, but if your sound
is already playing, another instance begins to play.
Stop
sync stops a sound that is already playing.
Stream
forces your Flash movie to keep up with the sound. Sometimes this causes
Flash to skip frames in order to keep up with the sound and remain synchronized.
See the section “Add Streaming Sound to the Timeline” to learn how to add and test streaming sounds.
267
Add Sound
to a Button
The most common user interface
sounds are triggered when you
mouse over or click on buttons.
You can add these sounds easily
using event sounds.
Add Sound to a Button
1
Place an instance of a button
symbol on the Stage.
See Chapter 8 to learn about
placing an instance on the Stage.
2
Right-click on your button and
click
Edit in Place
.
Note:
You can also edit in place by double-
clicking an object on the Stage.
1
2
l
The Timeline of the button
appears with frames for button
states.
3
Click a keyframe in the Down
column.
4
5
Note:
If you do not have a keyframe in the down
column, right-click the frame and click
Insert
Keyframe
.
4
Open the Properties inspector.
5
Choose a sound from the Name
menu.
3
268
Integrating Sound
chapter
12
6
Make sure your sync is set to
Event
.
6
7
Click
Control
.
8
Click
Enable Simple Buttons
.
9
Click
Scene 1
to return to the
main Timeline.
7
9
When you click your button, the
sound plays.
8
Which button frame should I
assign my sound to?
Typically, you add sound to the
Over frame, creating a rollover
effect. You may also want to add
sound to the Down frame to let
your user know that the button has
been clicked. Do not add sound to
the Hit frame because Flash never
reaches the Hit frame, so your sound will never play.
I don’t have the option to
add sound to a frame.
Why not?
You can only add sounds
to keyframes, and not
to regular frames in the
Timeline. Make sure to add
a keyframe wherever you
want to add sound.
269
[ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • asael.keep.pl