70
Working with Sound Working with Sound and Video and Video Lesson 7 Lesson 7 Classroom in a Book Classroom in a Book

Working with sound and video

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Working with sound and video

Working with Sound Working with Sound and Videoand Video

Lesson 7Lesson 7

Classroom in a BookClassroom in a Book

Page 2: Working with sound and video

Working withWorking withSound and VideoSound and Video

• • Import sound filesImport sound files

• • Edit sound filesEdit sound files

• • Use the Adobe Media EncoderUse the Adobe Media Encoder

• • Understand video and audio encoding optionsUnderstand video and audio encoding options

• • Play external video from your Flash projectPlay external video from your Flash project

• • Customize options on the playback componentCustomize options on the playback component

• • Work with video that contains alpha channelsWork with video that contains alpha channels

• • Embed video in your Flash projectEmbed video in your Flash project

Page 3: Working with sound and video

Getting StartedGetting Started

Page 4: Working with sound and video

Getting StartedGetting Started

1 1 Double-click the 07End.swf file in Double-click the 07End.swf file in the Lesson07/07End folder to play the Lesson07/07End folder to play the animation.the animation.

Page 5: Working with sound and video

Getting StartedGetting Started

2 2 Click a sound button to hear an animal Click a sound button to hear an animal sound.sound.

3 3 Click a thumbnail button to view a short Click a thumbnail button to view a short movie about the animal.movie about the animal.

4 4 Double-click the 07Start.fla file in the Double-click the 07Start.fla file in the Lesson07/07Start folder to open the initial Lesson07/07Start folder to open the initial project file in Flash.project file in Flash.

5 5 Choose File > Save As. Name the file Choose File > Save As. Name the file 07_workingcopy.fla07_workingcopy.fla, and save it in the , and save it in the 07Start folder. Saving a working copy 07Start folder. Saving a working copy ensures that the original start file will be ensures that the original start file will be available if you want to start over.available if you want to start over.

Page 6: Working with sound and video

Understanding the Understanding the Project FileProject File

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

Page 7: Working with sound and video

Understanding the Understanding the Project FileProject File

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.238p.238

Page 8: Working with sound and video

Understanding the Project Understanding the Project FileFile

You can import several types of sound files You can import several types of sound files into Flash. Flash supports MP3, WAV, and into Flash. Flash supports MP3, WAV, and AIFF files, which are three common kinds AIFF files, which are three common kinds of sound formats. of sound formats.

When you import sound files into Flash, When you import sound files into Flash, they are stored in your Library. they are stored in your Library.

You can then drag the sound files from the You can then drag the sound files from the Library on to the Stage at different points Library on to the Stage at different points along the Timeline to synchronize those along the Timeline to synchronize those sounds to whatever may be happening on sounds to whatever may be happening on the Stage.the Stage.

Page 9: Working with sound and video

Importing Sound FilesImporting Sound Files

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.242p.242

Page 10: Working with sound and video

Importing Sound FilesImporting Sound Files

1 1 Choose File > Import Choose File > Import > Import To Library.> Import To Library.

2 2 Select the Select the Monkey.wav file in the Monkey.wav file in the Lesson07/07Start/SouLesson07/07Start/Sounds folder, and click nds folder, and click Open (Windows) or Open (Windows) or Import To Library (Mac Import To Library (Mac OS).OS).

Page 11: Working with sound and video

Importing Sound FilesImporting Sound Files

3 3 Click the Play button on the far Click the Play button on the far upper-right corner of the Library upper-right corner of the Library preview window. The sound plays.preview window. The sound plays.

4 4 Double-click the sound icon in front Double-click the sound icon in front of your Monkey.wav file. The Sound of your Monkey.wav file. The Sound Properties dialog box appears, Properties dialog box appears, providing information on your sound providing information on your sound file, including its original location, file, including its original location, size, and other technical properties.size, and other technical properties.

Page 12: Working with sound and video

Importing Sound FilesImporting Sound Files

Page 13: Working with sound and video

Importing Sound FilesImporting Sound Files

5 5 Choose File > Import > Import To Choose File > Import > Import To Library and select the other sound files Library and select the other sound files to import into your Flash project. to import into your Flash project. Import Elephant.wav, Lion.wav, Import Elephant.wav, Lion.wav, Africanbeat. mp3, and Africanbeat. mp3, and Afrolatinbeat.mp3. Your Library should Afrolatinbeat.mp3. Your Library should contain all the sound files.contain all the sound files.

6 6 Create a folder in your Library and place Create a folder in your Library and place all the sound files inside it to organize all the sound files inside it to organize your Library. Name the folder your Library. Name the folder soundssounds..

Page 14: Working with sound and video

Importing Sound FilesImporting Sound Files

Page 15: Working with sound and video

Placing Sounds on Placing Sounds on the Timelinethe Timeline

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.244p.244

Page 16: Working with sound and video

Placing Sounds on the Placing Sounds on the TimelineTimeline

You can place a sound at any point You can place a sound at any point along the Timeline, and Flash will along the Timeline, and Flash will play that sound when the playhead play that sound when the playhead reaches the keyframe. You’ll place a reaches the keyframe. You’ll place a sound on the very first keyframe to sound on the very first keyframe to play as the movie starts to provide a play as the movie starts to provide a pleasant audio introduction and set pleasant audio introduction and set the mood.the mood.

Page 17: Working with sound and video

Placing Sounds on the Placing Sounds on the TimelineTimeline

1 1 Select the content layer on the Select the content layer on the Timeline.Timeline.

2 2 Insert a new layer and rename it Insert a new layer and rename it soundssounds..

Page 18: Working with sound and video

Placing Sounds on the Placing Sounds on the TimelineTimeline

3 3 Select the first keyframe of the Select the first keyframe of the sounds layer.sounds layer.

4 4 Drag the Afrolatinbeat.mp3 file from Drag the Afrolatinbeat.mp3 file from the sounds folder in your Library on the sounds folder in your Library on to the Stage.to the Stage.

Page 19: Working with sound and video

Placing Sounds on the Placing Sounds on the TimelineTimeline

5 5 Select the first Select the first keyframe of the keyframe of the sounds layer. In sounds layer. In the Property the Property inspector, note that inspector, note that your sound file is your sound file is now listed on the now listed on the pulldown menu pulldown menu under the Sound under the Sound section.section.

Page 20: Working with sound and video

Placing Sounds on the Placing Sounds on the TimelineTimeline

6 6 Select Stream for Select Stream for the Sync option.the Sync option.

Page 21: Working with sound and video

Placing Sounds on the Placing Sounds on the TimelineTimeline

7 7 Move the playhead back and forth on the Move the playhead back and forth on the Timeline. The sound plays as you scrub Timeline. The sound plays as you scrub the Timeline.the Timeline.

8 8 Choose Control > Test Movie. The sound Choose Control > Test Movie. The sound plays only for a short while before getting plays only for a short while before getting cut off. Because the sound is set to cut off. Because the sound is set to Stream, it only plays when the playhead Stream, it only plays when the playhead moves along the Timeline. There is a stop moves along the Timeline. There is a stop action at frame 9 that stops the playhead, action at frame 9 that stops the playhead, and hence, stops the sound.and hence, stops the sound.

Page 22: Working with sound and video

Adding Frames to the Adding Frames to the TimelineTimeline

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.246p.246

Page 23: Working with sound and video

Adding Frames to the Adding Frames to the TimelineTimeline

The next step is to extend the The next step is to extend the Timeline so that the entire sound (or Timeline so that the entire sound (or at least the portions that you desire) at least the portions that you desire) plays before the stop action.plays before the stop action.

Page 24: Working with sound and video

Adding Frames to the Adding Frames to the TimelineTimeline

1 1 Click on the Stage to deselect the Click on the Stage to deselect the Timeline, and then place the Timeline, and then place the playhead between frames 1 and 9 by playhead between frames 1 and 9 by clicking on the top frame numbers.clicking on the top frame numbers.

Page 25: Working with sound and video

Adding Frames to the Adding Frames to the TimelineTimeline

2 2 Choose Insert > Timeline > Frame, Choose Insert > Timeline > Frame, or press F5, to insert frames in all the or press F5, to insert frames in all the layers between frames 1 and 9.layers between frames 1 and 9.

3 3 Insert enough frames so that the Insert enough frames so that the entire Timeline extends to frame 80.entire Timeline extends to frame 80.

Page 26: Working with sound and video

Adding Frames to the Adding Frames to the TimelineTimeline

4 4 Choose Control > Test Movie.Choose Control > Test Movie.

The sound lasts longer because it has The sound lasts longer because it has more frames to play before the more frames to play before the playhead stops.playhead stops.

Page 27: Working with sound and video

Clipping the End of a Clipping the End of a SoundSound

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.247p.247

Page 28: Working with sound and video

Clipping the End of a SoundClipping the End of a Sound

The sound clip you imported is a bit The sound clip you imported is a bit longer than you need. You’ll shorten longer than you need. You’ll shorten the sound file by using the Edit the sound file by using the Edit Envelope dialog box. Then you’ll Envelope dialog box. Then you’ll apply a fade so that the sound apply a fade so that the sound gradually decreases as it ends.gradually decreases as it ends.

1 1 Select the first keyframe of the Select the first keyframe of the sounds layer.sounds layer.

Page 29: Working with sound and video

Clipping the End of a SoundClipping the End of a Sound

2 2 In the Property In the Property inspector, click the inspector, click the Edit button.Edit button.

Page 30: Working with sound and video

Clipping the End of a SoundClipping the End of a Sound

The Edit Envelope dialog box appears, The Edit Envelope dialog box appears, showing you the waveform. The top and showing you the waveform. The top and the bottom waveform are the left and right the bottom waveform are the left and right channels of the sound (stereo). A timeline channels of the sound (stereo). A timeline is between the waveforms, a pull-down is between the waveforms, a pull-down menu of preset effects at the left corner, menu of preset effects at the left corner, and view options at the bottom.and view options at the bottom.

Page 31: Working with sound and video

Clipping the End of a SoundClipping the End of a Sound

3 3 In the Edit Envelope dialog box, click In the Edit Envelope dialog box, click the Seconds icon.the Seconds icon.

The timeline changes units to show The timeline changes units to show seconds instead of frames. You can seconds instead of frames. You can click theclick the

Frames icon to switch back, Frames icon to switch back, depending on how you want to view depending on how you want to view your sound.your sound.

Page 32: Working with sound and video

Clipping the End of a SoundClipping the End of a Sound

4 4 Click the Zoom Out icon until you Click the Zoom Out icon until you can see the entire waveform.can see the entire waveform.

The waveform appears to end at The waveform appears to end at around 120 frames, or about 10 around 120 frames, or about 10 seconds.seconds.

Page 33: Working with sound and video

Clipping the End of a SoundClipping the End of a Sound

5 5 Drag the right end of the time slider Drag the right end of the time slider inward to about frame 40.inward to about frame 40.

Page 34: Working with sound and video

Clipping the End of a SoundClipping the End of a Sound

6 6 Click OK to accept the changes Click OK to accept the changes you’ve made.you’ve made.

The waveform on the main Timeline The waveform on the main Timeline indicates the shortened sound.indicates the shortened sound.

Page 35: Working with sound and video

Changing the Volume Changing the Volume of a Soundof a Sound

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.249p.249

Page 36: Working with sound and video

Changing the Volume of a Changing the Volume of a SoundSound

The sound will be more elegant if it The sound will be more elegant if it slowly fades out instead of being slowly fades out instead of being abruptly cut off. You can change the abruptly cut off. You can change the volume levels through time in the volume levels through time in the Edit Envelope dialog box.Edit Envelope dialog box.

1 1 Select the first keyframe of the Select the first keyframe of the sounds layer.sounds layer.

Page 37: Working with sound and video

Changing the Volume of a Changing the Volume of a SoundSound

2 2 In the Property inspector, click the In the Property inspector, click the Edit button.Edit button.

The Edit Envelope dialog box The Edit Envelope dialog box appears.appears.

Page 38: Working with sound and video

Changing the Volume of a Changing the Volume of a SoundSound

3 3 Select the Frames viewing option, Select the Frames viewing option, and zoom in on the waveform to see and zoom in on the waveform to see its end near frame 40.its end near frame 40.

Page 39: Working with sound and video

Changing the Volume of a Changing the Volume of a SoundSound

4 4 Click on the top horizontal line of the Click on the top horizontal line of the top waveform above frame 35.top waveform above frame 35.

A box appears on the line, indicating A box appears on the line, indicating a keyframe for the sound volume.a keyframe for the sound volume.

Page 40: Working with sound and video

Changing the Volume of a Changing the Volume of a SoundSound

5 5 Click on the top horizontal line of the Click on the top horizontal line of the upper waveform above frame 40 and drag upper waveform above frame 40 and drag it down to the bottom of the window.it down to the bottom of the window.

The downward diagonal line indicates the The downward diagonal line indicates the drop in volume from 100% to 0%.drop in volume from 100% to 0%.

Page 41: Working with sound and video

Changing the Volume of a Changing the Volume of a SoundSound

6 6 Click on the corresponding keyframe on the lower Click on the corresponding keyframe on the lower waveform and drag it down to the bottom of the waveform and drag it down to the bottom of the window.window.

The volume levels for both the left and right The volume levels for both the left and right channels slowly decrease starting at frame 35. By channels slowly decrease starting at frame 35. By frame 40, the volume level is at 0%.frame 40, the volume level is at 0%.

Page 42: Working with sound and video

Changing the Volume of a Changing the Volume of a SoundSound

7 7 Test the effects of your sound edits Test the effects of your sound edits by clicking the Play button on the by clicking the Play button on the lower-left side of the dialog box. Click lower-left side of the dialog box. Click OK to accept the changes.OK to accept the changes.

Page 43: Working with sound and video

Changing the Volume of a Changing the Volume of a SoundSound

Note: Note: You can apply some of the You can apply some of the preset effects from the pulldown preset effects from the pulldown menu in the Edit Envelope dialog box menu in the Edit Envelope dialog box by just choosing them. Common by just choosing them. Common effects like a fade in or a fade out are effects like a fade in or a fade out are provided for your convenience.provided for your convenience.

Page 44: Working with sound and video

Deleting or Changing Deleting or Changing the Sound Filethe Sound File

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.251p.251

Page 45: Working with sound and video

Deleting or Changing the Deleting or Changing the Sound FileSound File

If you don’t want the sound on your If you don’t want the sound on your Timeline, or you want to change the Timeline, or you want to change the sound to a different one, you can sound to a different one, you can make those changes from the make those changes from the Property inspector.Property inspector.

Page 46: Working with sound and video

Deleting or Changing the Deleting or Changing the Sound FileSound File

1 1 Select the first keyframe of the Select the first keyframe of the sounds layer.sounds layer.

2 2 In the Property inspector, select In the Property inspector, select None in the Name pull-down menu.None in the Name pull-down menu.

The sound is removed from the The sound is removed from the Timeline.Timeline.

Page 47: Working with sound and video

Deleting or Changing the Deleting or Changing the Sound FileSound File

3 3 Select Africanbeat.mp3 for Name.Select Africanbeat.mp3 for Name.

The Africanbeat.mp3 sound is added to The Africanbeat.mp3 sound is added to the Timeline.the Timeline.

Page 48: Working with sound and video

Increasing the Quality Increasing the Quality of the Soundsof the Sounds

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.252p.252

Page 49: Working with sound and video

Increasing the Quality of the Increasing the Quality of the SoundsSounds

The default settings on a new Flash The default settings on a new Flash project use fairly high compression project use fairly high compression on sounds, which results in poor-on sounds, which results in poor-quality audio. quality audio.

It’s best to increase the quality of the It’s best to increase the quality of the sound export through the Publish sound export through the Publish Settings options.Settings options.

Page 50: Working with sound and video

Increasing the Quality of the Increasing the Quality of the SoundsSounds

1 1 Choose File > Publish Settings.Choose File > Publish Settings. The Publish Settings dialog box The Publish Settings dialog box

appears.appears.

Page 51: Working with sound and video

Increasing the Quality of the Increasing the Quality of the SoundsSounds

2 2 Click the Flash tab Click the Flash tab and click the Set and click the Set button for the button for the Audio Stream Audio Stream options.options.

The Sound Settings The Sound Settings dialog box appears.dialog box appears.

Page 52: Working with sound and video

Increasing the Quality of the Increasing the Quality of the SoundsSounds

3 3 Increase the Bit rate to 48 kbps.Increase the Bit rate to 48 kbps. The Bit rate determines the quality of The Bit rate determines the quality of

the sound in your final, exported the sound in your final, exported Flashmovie. Flashmovie.

The higher the bit rate, the better the The higher the bit rate, the better the quality. However, the higher the bit quality. However, the higher the bit rate, the larger your file becomes. rate, the larger your file becomes.

You must determine the balance of You must determine the balance of quality and file size based on the quality and file size based on the minimum acceptable level of quality.minimum acceptable level of quality.

Page 53: Working with sound and video

Increasing the Quality of the Increasing the Quality of the SoundsSounds

4 4 Deselect the option to Convert stereo to Deselect the option to Convert stereo to monomono

Stereo sounds will be preserved. The Stereo sounds will be preserved. The Africanbeat.mp3 file in particular relies on Africanbeat.mp3 file in particular relies on stereo effects, so keeping both the left and stereo effects, so keeping both the left and right channels is important. Click OK to right channels is important. Click OK to accept the settings.accept the settings.

Page 54: Working with sound and video

Increasing the Quality of the Increasing the Quality of the SoundsSounds

5 5 Click the Set button for the Audio Event Click the Set button for the Audio Event options.options.

The Sound Settings dialog box appears.The Sound Settings dialog box appears.6 6 Increase the Bit rate to 48 kbps and Increase the Bit rate to 48 kbps and

deselect the option to Convert stereo to deselect the option to Convert stereo to mono. mono.

Click OK to accept the settings.Click OK to accept the settings. Both the Audio Stream and Audio Event Both the Audio Stream and Audio Event

settings should be at 48 kbps with settings should be at 48 kbps with Stereo.Stereo.

Page 55: Working with sound and video

Increasing the Quality of the Increasing the Quality of the SoundsSounds

7 7 Select Override sound settings. Select Override sound settings. The sound settings in the Publish The sound settings in the Publish

Settings will determine how all your Settings will determine how all your sounds are exported.sounds are exported.

Page 56: Working with sound and video

Increasing the Quality of the Increasing the Quality of the SoundsSounds

8 8 Choose Control > Test Movie.Choose Control > Test Movie. The quality of the sound will be The quality of the sound will be

greatly increased in your exported greatly increased in your exported SWF.SWF.

Page 57: Working with sound and video

Adding Sounds to Adding Sounds to ButtonsButtons

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.254p.254

Page 58: Working with sound and video

Adding Sounds to ButtonsAdding Sounds to Buttons

In the kiosk, the buttons appear in a In the kiosk, the buttons appear in a column on the right. You’ll add column on the right. You’ll add sounds to the buttons so that they sounds to the buttons so that they play whenever the user clicks them.play whenever the user clicks them.

Page 59: Working with sound and video

Adding Sounds to ButtonsAdding Sounds to Buttons

1 1 In the Library, double-click the icon In the Library, double-click the icon of the button symbol called of the button symbol called sound_button1.sound_button1.

You enter symbol-editing mode for You enter symbol-editing mode for that button symbol.that button symbol.

Page 60: Working with sound and video

Adding Sounds to ButtonsAdding Sounds to Buttons

2 2 There are three layers in the button There are three layers in the button symbol to help organize the content symbol to help organize the content for thefor the

Up, Over, Down, and Hit keyframes.Up, Over, Down, and Hit keyframes.

Page 61: Working with sound and video

Adding Sounds to ButtonsAdding Sounds to Buttons

3 3 Insert a new layer and rename it Insert a new layer and rename it soundssounds..

Page 62: Working with sound and video

Adding Sounds to ButtonsAdding Sounds to Buttons

4 4 Select the Down frame in your Select the Down frame in your sounds layer and insert a keyframe.sounds layer and insert a keyframe.

A new keyframe appears in the Down A new keyframe appears in the Down state of your button.state of your button.

Page 63: Working with sound and video

Adding Sounds to ButtonsAdding Sounds to Buttons

5 5 Drag the Monkey.wav file from the Drag the Monkey.wav file from the sounds folder in your Library to the sounds folder in your Library to the Stage.Stage.

A waveform for the Monkey.wav file A waveform for the Monkey.wav file appears in the Down keyframe of the appears in the Down keyframe of the sounds layer.sounds layer.

Page 64: Working with sound and video

Adding Sounds to ButtonsAdding Sounds to Buttons

6 6 Select the Down keyframe in the sounds Select the Down keyframe in the sounds layer.layer.

7 7 In the Property inspector, choose Start for In the Property inspector, choose Start for the Sync option.the Sync option.

A Start sync option triggers the sound A Start sync option triggers the sound whenever the playhead enters that whenever the playhead enters that particular keyframe.particular keyframe.

Page 65: Working with sound and video

Adding Sounds to ButtonsAdding Sounds to Buttons

8 8 Choose Control > Test Movie. Test Choose Control > Test Movie. Test the first button to hear the monkey, the first button to hear the monkey, and then close the preview window.and then close the preview window.

9 9 Edit the sound_button2 and the Edit the sound_button2 and the sound_button3 to add the Lion.wav sound_button3 to add the Lion.wav and the Elephant.wav sounds to their and the Elephant.wav sounds to their Down frames.Down frames.

Page 66: Working with sound and video

Understanding Sound Understanding Sound Sync OptionsSync Options

Capitulo 7Capitulo 7

Classroom in a bookClassroom in a book

p.255p.255

Page 67: Working with sound and video

Understanding Sound Sync Understanding Sound Sync OptionsOptions

Sound sync refers to the way the Sound sync refers to the way the sound is triggered and played. There sound is triggered and played. There are several options: Event, Start, are several options: Event, Start, Stop, and Stream.Stop, and Stream.

Page 68: Working with sound and video

Understanding Sound Sync Understanding Sound Sync OptionsOptions

Stream links the sound to the Stream links the sound to the Timeline so you can easily Timeline so you can easily synchronize animated elements to synchronize animated elements to the sound.the sound.

Page 69: Working with sound and video

Understanding Sound Sync Understanding Sound Sync OptionsOptions

Event and Start are used to trigger a Event and Start are used to trigger a sound (usually a short sound) to a sound (usually a short sound) to a specific event, like a button click.specific event, like a button click.

Event and Start are similar except Event and Start are similar except that the Start sync does not trigger that the Start sync does not trigger the sound if it is already playing (so the sound if it is already playing (so there are no overlapping sounds there are no overlapping sounds possible with Start sync).possible with Start sync).

Page 70: Working with sound and video

Understanding Sound Sync Understanding Sound Sync OptionsOptions

The Stop option is used to stop a The Stop option is used to stop a sound, although you’ll use it rarely, if sound, although you’ll use it rarely, if ever. If you want to stop a sound ever. If you want to stop a sound with a Stream sync, simply insert a with a Stream sync, simply insert a blank keyframe.blank keyframe.