9. Working with Sound and Video


Lesson Overview

Import sound files

Edit and split sound files

Use Adobe Media Encoder to prepare video

Understand video and audio encoding options

Use components to playback video for Adobe AIR, ActionScript 3.0, or HTML5 Canvas documents

Embed video as a guide to animation

Customize options on video playback components

Work with video that contains alpha channels

Embed video on the Timeline

Image

This lesson will take approximately 3 hours to complete. Download the project files for this lesson from the Registered Products tab on your Account page at www.peachpit.com (click the Access Bonus Content link) and store them on your computer in a convenient location, as described in the Getting Started section of this book. Your Account page is also where you’ll find any updates to the lessons or to the lesson files.


A screenshot shows an application window with heading at the top as "Shearwood Wildlife Preserve." It shows a video clip running with control buttons below the clip. It also shows various sound tracks and video clips at the bottom. A photo of a lion sleeping on a rock is shown next to the clip.

Sound and video add new dimensions to your projects. Import sound files and edit them directly in Adobe Animate CC, and use Adobe Media Encoder CC to compress and convert video files to use in your projects. Use Animate CC to export your animations as HD video.

Getting Started

Start the lesson by viewing the finished animated zoo kiosk. You’ll create the kiosk by adding sound and video files to a project in Adobe Animate CC in an AIR for Desktop document.

A screenshot shows the "Shearwood-Wildlife-Preserve.air" file icon.

1. Double-click the file Shearwood-Wildlife-Preserve.air, a cross-platform program, in the Lesson09/09End folder to play the animation.

The installer will warn you that the application comes from an unknown author, but you can trust us! Click Install. When the installation is done, the application launches a new window at the upper-left corner of your desktop. View the movie of the polar bear with a short soundtrack of an African beat. A zoo director pops up and introduces himself.


Image Note

If you have not already downloaded the project files for this lesson to your computer from your Account page, make sure to do so now. On that page you’ll also find a downloadable Supplement to this lesson that contains information on bonus topics. See Getting Started at the beginning of the book.



Image Note

If your computer asks you to choose an application to open the file, you’ll need to install the Adobe AIR runtime. Go to get.adobe.com/air and follow the installation instructions.


A screenshot shows an application window with heading at the top as "Shearwood Wildlife Preserve." It shows a zoo director with a photo of a lion sleeping on a rock. It also shows various sound tracks and video clips at the bottom.

2. Click a sound button (in the lower-left corner) to hear an animal sound.

3. Click one of the buttons bearing the picture and name of an animal to view a short movie about the animal. Use the interface controls below the movie to pause, continue, or lower the volume.

A screenshot shows an application window with heading at the top as "Shearwood Wildlife Preserve." It shows a video clip running with control buttons below the clip. It also shows various sound tracks and video clips at the bottom. A photo of a lion sleeping on a rock is shown next to the clip.

4. Press Ctrl+Q/Command+Q to close the application (or choose Quit from the Mac OS Dock or Windows Taskbar).

In this lesson, you’ll import audio files and put them on the Timeline to provide the short introductory audio flourish and then embed some of those sounds in each button. Moving on to video, you’ll use Adobe Media Encoder CC to compress and convert the video files to the appropriate format for Animate. Other useful techniques you’ll learn include how to work with transparent backgrounds in video to create the silhouetted zoo director video and how to export Animate content to high-quality video.

1. Double-click the 09Start.fla file in the Lesson09/09Start folder to open the initial project file in Animate CC.

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

Understanding the Project File

The project file is an AIR for Desktop document. The final published project is a self-contained application that runs on either the Windows or Mac OS desktop without needing a browser.

The initial setup of the project has been completed except for the audio and video portions and some of the ActionScript code. The Stage is 1000 × 700 pixels. A photo of a snoozing lion forms the background of the application. Layered above the background is a row of buttons along the bottom of the Stage, with three simple buttons at the left and a set of buttons depicting colorful animals to the right. A title banner spans the top of the Stage.

A screenshot shows an application window with heading at the top as "Shearwood Wildlife Preserve." It shows a photo of a lion sleeping on a rock. It also shows various sound tracks and video clips at the bottom.

The Timeline contains several layers that separate the different content.

A screenshot shows the "Timeline panel" with a list of layers from bottom to top as background photo, title, bottom navbar, buttons, sound buttons, videos, and actions.

The bottom three layers, called background photo, title, and bottom navbar, contain design elements, text, and images. The two layers directly above, called buttons and sound buttons, contain instances of button symbols. The videos layer contains several labeled keyframes, and the actions layer contains ActionScript that provides the event handlers for the bottom row of buttons.

If you’ve completed Lesson 8, you should be familiar with the structure of this Timeline. The individual buttons on the bottom row are already coded so that when the user clicks a button, the playhead moves to a corresponding labeled keyframe in the videos layer. You’ll be inserting content into each of those keyframes. But first you’ll learn to work with sound.

Using Sounds

You can import several types of sound files into Animate, among them MP3, AIFF, and WAV files, which are three common sound formats. When you import sound files into Animate, they are stored in your Library panel. You can then drag the sound files from the Library panel onto the Stage at different points along the Timeline to synchronize those sounds to whatever may be happening on the Stage.

Importing sound files

You’ll import several sound files to the Library panel, which you’ll use throughout this lesson.

1. Choose File > Import > Import To Library.

2. Select the Monkey.wav file in the Lesson09/09Start/Sounds folder, and click Open.

The Monkey.wav file appears in your Library panel. The sound file is indicated by a unique icon, and when it is selected the preview window shows a waveform—a series of peaks and valleys that represent the sound.

A screenshot shows the "Library panel" with the preview window showing a waveform at the top followed by a list of sound files with file "Monkey.wav" being selected.

3. Click the Play button in the far upper-right corner of the Library preview window.

The sound plays.

4. Double-click the sound icon to the left of your Monkey.wav file.

The Sound Properties dialog box appears, providing information on your sound file, including its original location, size, and other technical properties. Click OK to close the dialog box.

A screenshot shows the "Sound Properties" dialog box with the preview window showing a waveform on the left and options button selected on the right.

5. Choose File > Import > Import To Library and select the other sound files to import into your Animate project. Import Elephant.wav, Lion.wav, Africanbeat.mp3, and Afrolatinbeat.mp3. Click Open to import the files.


Image Tip

Hold down the Shift key to select multiple files to import all at once.


Your Library panel should contain all the sound files.

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

A screenshot shows the "Library panel" with the preview window showing two waveforms at the top followed by a list of sound files with file "Afrolatinbeat.mp3" from the "Sound" folder being selected.

Image Note

In addition to MP3, AIFF, and WAV files, Animate supports ASND (Adobe Sound), SD2 (Sound Designer II), AU (Sun AU), FLAC, and OGG or OFF (Ogg Vorbis).


Placing sounds on the Timeline

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

1. Select the videos layer on the Timeline.

2. Insert a new layer and rename it sounds.

A screenshot shows the "Timeline panel" with a list of layers from bottom to top as background photo, title, bottom navbar, buttons, sound buttons, videos, and actions. A new layer between actions and videos is being renamed as "sounds."

3. Select the first keyframe of the sounds layer.

4. Drag the Afrolatinbeat.mp3 file from the sounds folder in your Library panel onto the Stage.

The waveform of your sound appears on the Timeline.

A screenshot shows the "Timeline panel" with a list of layers from bottom to top as background photo, title, bottom navbar, buttons, sound buttons, videos, sounds, and actions. The layer sounds is selected and a waveform of the sound is displayed on the Timeline.

5. Select the first keyframe of the sounds layer, if it’s not already selected.

In the Properties panel, in the Sound section, note that your sound file is now listed on the Name menu.

6. Choose Stream from the Sync menu.

A screenshot shows the "Properties panel" with the file "Afrolatinbeat.mp3" in the "Sound" option being highlighted.

The Sync options determine how the sound plays on the Timeline. Use Stream sync for long passages of music or narration when you want to synchronize the sound with the Timeline.

7. Move the playhead back and forth on the Timeline.

The sound plays as you scrub the Timeline.

8. Choose Control > Test.

The sound plays only for a short time before getting cut off. Because the sound is set to Stream, it plays only when the playhead moves along the Timeline, and if there are sufficient frames to play. There is a stop action at frame 9 that stops the playhead and thus stops the sound.

A screenshot shows the "Sound" section of the "Properties panel" with the option "Stream" from the drop-down menu for "Sync" being selected.

Adding frames to the Timeline

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

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

A screenshot shows the "Timeline panel" with a list of layers from bottom to top as background photo, title, bottom navbar, buttons, sound buttons, videos, sounds, and actions.

2. Choose Insert > Timeline > Frame, or press F5, to insert one frame into each layer between frames 1 and 9.

3. Continue inserting frames until the sound will be able to play for about 50 frames before it hits the the stop action in the second keyframe of the actions layer. The keyframe that contains the stop action should be at frame 51.

A screenshot shows the "Timeline panel" with a list of layers from bottom to top as background photo, title, bottom navbar, buttons, sound buttons, videos, sounds, and actions.

4. Choose Control > Test.

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

Clipping the end of a sound

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

1. Select the first keyframe of the sounds layer.

A screenshot shows the "Properties panel" with the "Edit Sound Envelope" button (bearing pencil icon) in the "Sound" section, to the right of the Effect menu highlighted.

2. In the Properties panel, in the Sound section, click the Edit Sound Envelope button, which is to the right of the Effect menu and bears a pencil icon.

The Edit Envelope dialog box appears, showing you the sound’s waveform.

The upper and lower waveforms represent the left and right channels of the stereo sound, respectively. The thin black line running horizontally above each waveform shows the sound level for each channel, and together they make up the envelope of the sound. A timeline runs between the waveforms, the Effect menu in the upper-left corner offers preset effects, and buttons that enable view options occupy the bottom-right corner.

An annotated screenshot shows the "Edit Envelope" dialog box with the sound’s waveform.

3. In the Edit Envelope dialog box, click the Seconds button, if it isn’t already selected.

The Timeline changes units to show seconds instead of frames. Click the Frames button to switch back. You can switch back and forth, depending on how you want to view your sound.

An annotated screenshot shows the icons for the view options as follows: ? Zoom out ? Zoom in ? Seconds ? Frames

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

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

5. Drag the right end of the time slider to the left to about frame 45.

The sound shortens by being clipped from the end. The sound now plays for about 45 frames.

An annotated screenshot shows the "Edit Envelope" dialog box with a point on the timeline near 45 highlighted..

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

The waveform on the main Timeline indicates the shortened sound.

A screenshot shows the "Timeline panel" with a list of layers from bottom to top as background photo, title, bottom navbar, buttons, sound buttons, videos, sounds, and actions. The layer sounds is selected and a waveform of the sound is displayed on the Timeline.

Image Note

Edits made in the Edit Envelope dialog box are nondestructive. That means that shortening an audio clip doesn’t discard any of the data—it just changes how much of the clip is played in a movie. If you change your mind later, you can always lengthen the clip again.


Changing the volume of a sound

The sound will be more elegant if it slowly fades out instead of being abruptly cut off. You can change the volume levels through time in the Edit Envelope dialog box. Use it to fade in, fade out, or modulate the volume of the left and right channels separately.

1. Select the first keyframe of the sounds layer.

2. In the Properties panel, click the Edit Sound Envelope button.

The Edit Envelope dialog box appears.

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

An annotated screenshot shows the "Edit Envelope" dialog box with two waveforms.

4. Click the left channel level above frame 20.

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

An annotated screenshot shows the "Edit Envelope" dialog box with two waveforms and the pointer being clicked near 20 in the first waveform.

5. Click the left channel level above frame 45 and drag it down to the bottom of the channel.

An annotated screenshot shows the "Edit Envelope" dialog box with two waveforms and the left channel level being dragged down to the bottom of the channel in the first waveform.

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

6. Click the corresponding keyframe on the right channel level and drag it down to the bottom of the channel. Click OK to close the dialog box.

An annotated screenshot shows the "Edit Envelope" dialog box with two waveforms and the left channel level being dragged down to the bottom of the channel in the second waveform.

Deleting or changing the sound file

If you don’t want the sound on your Timeline, or you want to change to a different sound, you can make those changes in the Properties panel.

1. Select the first keyframe of the sounds layer.

2. In the Properties panel, choose None from the Name menu.

A screenshot shows the "Properties panel" with option "None" from the Name menu being selected.

The sound is removed from the Timeline.


Image Note

To learn about controlling the quality of the sound in your published file, see “Setting the quality of the sounds” in the Supplement to this lesson.


3. Now let’s add a different sound. Choose Africanbeat.mp3 from the menu.

The Africanbeat.mp3 sound is added to the Timeline. The settings in the Edit Envelope dialog box that clip the sound and fade it out are reset (since you chose None to remove the Afrolatinbeat.mp3 sound). Return to the Edit Envelope dialog box to customize the Africanbeat.mp3 sound in the same way as the previous sound.

A screenshot shows the option "Africanbeat.mp3" from the Name menu in the "Sound" section being selected.

Adding sounds to buttons

In the kiosk, the buttons that control sound appear on your Stage on the left. You’ll add sounds to the buttons so that they play whenever the user clicks them.

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

You enter symbol-editing mode for that button symbol.

A screenshot shows the "Timeline panel" with "Icon" layer selected and a sound icon being clicked.

The three layers in the button symbol help organize the content for the Up, Over, Down, and Hit states.

2. Insert a new layer and rename it sounds.

A screenshot shows the "Timeline panel" with a layer being renamed as "Sounds."

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

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

A screenshot shows the "Timeline panel" with "Sounds" layer selected.

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

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

A screenshot shows the "Timeline panel" with "Sounds" layer selected.

5. Select the Down keyframe in the sounds layer.

A screenshot shows the option "Start" from the Sync menu in the "Sound" section being selected.

6. In the Properties panel, in the Sound section, choose Start from the Sync menu.

When Sync is set to Start for a keyframe, the sound is triggered whenever the playhead enters that particular keyframe.

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

A screenshot shows three sound buttons labeled "Sound 1," "Sound 2," and "Sound 3."

8. Edit sound_button2 and sound_button3 to add the Lion.wav and the Elephant.wav sounds to their Down states. Click Scene 1 in the Edit bar to exit symbol-editing mode.


Image Note

You can also add sound with an Event or Start Sync to the Over state of a button symbol, and the sound will play whenever the mouse cursor just hovers over the button.


Understanding Video

Animate makes it very easy to deliver video. Combining video, interactivity, and animation can create a very rich and immersive multimedia experience for your viewers.


Image Note

Video playback is not supported in WebGL documents.


Deploying video varies depending on whether you’re working in an ActionScript 3.0, AIR for Desktop, AIR for Android, AIR for iOS, or HTML5 Canvas document.

Video with ActionScript 3.0 or AIR documents

If you’re working in an ActionScript 3.0 or an AIR document, as you are in this lesson, you have two options for displaying video. The first option is to use the FLVPlayback component to play the video. A component in Animate is a reusable, packaged module that adds a particular capability to an Animate document. This component is a special widget that is used on the Stage to play your external video.

Using the FLVPlayback component allows you to keep the video separate from your Animate file. If you have a very short video clip, you can use the second option, which is to embed the video directly inside your Animate file.

Video with HTML5 Canvas documents

If you want to display video in an HTML5 Canvas document, you use Animate’s Video component. The Video component, like that for ActionScript 3.0 documents, provides an easy interface to point to the correct external video file and change playback parameters.

Video encoding

Whichever approach you’re taking to display video, Animate requires that the video be encoded correctly first. To use a playback component from Animate to play your video, the video must be encoded in the H.264 standard, a video codec that delivers high quality with very efficient compression. A codec (compression-decompression) is a method computers use to compress a video file to save space and then to decompress it to play it back. The H.264 codec is used in MP4 video files (which are very common), so MP4 videos can be used across ActionScript 3.0, AIR, and HTML5 Canvas documents.


Image Note

To convert a video to FLV format, you have to use a version of Adobe Media Encoder CC (AME) older than the 2014 release. Stand-alone versions of AME CC and older are not available for download, but you can use your Adobe Creative Cloud subscription to download Adobe Premiere Pro CC or CS6 and that will include a copy of AME.


To embed a video in your ActionScript 3.0 or AIR document, your video must be an FLV file, an older format that uses a different codec. Embedding video is a less common way of handling video, so most of your work with video will be done with MP4 files using H.264 encoding.

Using Adobe Media Encoder CC

You can convert your video files to the proper video format using Adobe Media Encoder CC, a stand-alone application that is installed with Animate CC. Adobe Media Encoder can convert single files or multiple files (known as batch processing) to make your workflow easier.

Adding a video file to Adobe Media Encoder

The first step in converting your video file to a compatible Animate format is to add the video to Adobe Media Encoder for encoding.


Image Note

If Adobe Media Encoder CC is not available on your machine for some reason, use the Adobe Creative Cloud desktop application to download and install it.


1. Launch Adobe Media Encoder CC.

A screenshot shows the "Media Browser" in the top left part, "Preset Browser" in the bottom left part, "Queue panel" in the top right part, and "Encoding panel" in the bottom right part.

The opening screen displays the Queue panel in the upper right, which shows any current video files that have been added for processing. The Queue panel should be empty. The other panels are the Encoding panel, which shows any video currently being processed; Media Browser, which lets you navigate to find computer for video files; and the Preset Browser, which provides commonly used predefined settings.

2. Choose File > Add Source, or click the Add Source button (with the plus sign icon) in the Queue panel.

A screenshot shows the "Queue panel" with a plus icon near top left corner highlighted.

A file navigation dialog box opens to allow you to select a video file.

3. Navigate to the Lesson09/09Start folder, select the Penguins.mov file, and click Open.

The Penguins.mov file is added to the queue of files for processing and is ready for conversion to your choice of video format.

A screenshot shows the "Queue panel" with the "Penguins.mov" file shown in the queue of files.

Image Tip

You can also drag the file directly to the Queue panel from your desktop.



Image Note

By default Adobe Media Encoder does not start processing the queue automatically when the program is idle. You can change this setting by choosing Adobe Media Encoder > Preferences > General and selecting the Start Queue Automatically option.


Converting video files for Animate

Converting your video files is easy, and the length of time it takes depends on how large your original video file is and your computer’s processing speed.

1. In the first column under Format, stick with the selected default, H.264.

A screenshot shows the "Queue panel" with the "H.264" options being selected from the menu options.

H.264 is a widely accepted codec for web videos and works with Animate’s video components.

2. Click the arrowhead in the Preset column to open the Preset menu.

A screenshot shows the "Queue panel" with the Preset column displaying a list of options in the "Preset menu."

The video presets determine the dimensions of the video and the quality of the video based on specific playback platforms and devices. Keep the current selection at Match Source – High bitrate.

3. Click the name of the preset you just chose.

The Export Settings dialog box appears, with advanced settings for cropping, resizing, clipping, and many other video and audio options. You’ll resize the penguin video so that it fits comfortably on the Stage of your zoo kiosk project.

A screenshot shows the "Export Settings" dialog box a photo displayed on the left and various options on the right.

4. Click the Video tab. Deselect Match This Property To The Source Video to allow the video to be resized and enter 432 for the Width. Click outside the field to accept the change.

Because the Constrain Proportions option is selected (chain link icon), Animate modifies the Height to 320 to keep the proportions of your video consistent.

A screenshot shows the "Video tab," "Video dimensions," and "Match This Property To The Source Video" button highlighted. The "Video dimensions" shows width as 432 and height as 320.

5. Click OK.

Animate closes the Export Settings dialog box and saves your advanced video and audio settings.

6. Click the link under the Output File column.

The Save As dialog box appears. You can choose to save the converted file in a different location on your computer or choose a different filename. Your original video will not be deleted or altered in any way. For this exercise, click Cancel.

7. Click the Start Queue button (with the green triangular icon) in the upper-right corner.


Image Note

To learn about automating the processing of multiple videos, see “Using the Watch Folders panel and the Preset Browser settings” in the Supplement to this lesson.


A screenshot shows the "Queue panel" with a play button near top right corner highlighted.

Adobe Media Encoder begins the encoding process. The Encoding panel shows the progress of the operation (along with a preview of the video) and the encoding settings.

A screenshot shows the "Encoding panel" displaying the progress of the operation (along with a preview of the video) and the encoding settings.

When the encoding process finishes, “Done” appears in the Status column of the Queue panel.

You now have the Penguins.mp4 file in your Lesson09/09Start folder along with the original Penguins.mov file.


Image Note

You can change the status of an individual file in the Queue panel by selecting the file in the display list and choosing Edit > Reset Status or Edit > Skip Selection. Reset Status removes the Done label from a completed file so it can be encoded again, whereas Skip Selection makes Animate skip that particular file when you have multiple files in the queue.


Understanding Encoding Options

You can customize many settings when converting your original video. You’ve already seen how you can change the size of the original video when you converted the penguin movie. You can also crop your video to specific dimensions, convert only a snippet of the video, adjust the type of compression and the compression levels, and even apply filters to the video. To display the encoding options available, select the Penguins.mov file in the Queue panel, and then choose Edit > Reset Status. Click the entry in the Format or the Preset column. The Export Settings dialog box appears, shown here.

An annotated screenshot shows the "Export Settings" dialog box.

Adjusting video length

Your video may have unwanted segments at the beginning or the end. You can shave off footage by placing In and Out points where you want your video to begin and end.

1. Drag the playhead (top blue marker) to scrub through your video to preview the footage. Place the playhead at the point where you want your video to start playing.

A screenshot shows the progress bar with the playhead (top blue marker) being dragged and highlighted.

Image Note

To learn about trimming the dimensions of your videos, see “Cropping your video” in the Supplement to this lesson.


The current-time indicator at the left end of the Timeline shows the position of the playhead in hours, minutes, seconds, and frames.

2. Click the Set In Point button.

The In point moves to the current position of the playhead.

A screenshot shows the progress bar with the "Set In Point" button highlighted.

3. Drag the playhead to the point where you want your video to stop.

4. Click the Set Out Point button.

The Out point moves to the current position of the playhead.

A screenshot shows the progress bar with the "Set Out Point" button highlighted.

5. You can also simply drag the In and Out point markers to bracket the desired video segment.

The highlighted portion of your video between the In and Out point markers will be the only segment of your original video that will be encoded.

6. Drag the In and Out points back to their original positions, or choose Entire Clip from the Source Range menu, because you do not need to adjust the video length for this lesson.

A screenshot shows the progress bar with the "Entire Clip" from the Source Range menu being selected.

Image Tip

You can use the Left or Right Arrow key on your keyboard to move back or ahead frame by frame for finer control.


Setting advanced video and audio options

The right side of the Export Settings dialog box contains information about the original video and summarizes the export settings.

You can choose one of the options from the top Preset menu. At the bottom, you can navigate to advanced video and audio encoding options using the tabs. At the very bottom, Animate displays the estimated output size.

An annotated screenshot shows the "Export Settings" dialog box.

Saving advanced video and audio options

If you want to apply the same settings to many videos, it makes sense to save your advanced video and audio options. You can do that in Adobe Media Encoder. Once you have saved your settings, you can easily apply them to other videos in the queue.

1. In the Export Settings dialog box, click the Save Preset button.

A screenshot shows the "Export Settings" dialog box with the "Save Preset" button highlighted.

2. In the dialog box that opens, provide a descriptive name for the video and audio options. Click OK.

A screenshot shows the "Choose Name" dialog box with "zoo kiosk resize" selected.

3. In the Export Settings dialog box, click OK to return to the queue of videos. You can apply your custom settings to additional videos by simply choosing an item from the Preset menu or from the Preset Browser panel.

A screenshot shows the "Queue panel" with the Preset column displaying a list of options in the "Preset menu."

4. Press Ctrl+Q/Command+Q to quit Adobe Media Encoder.

Playback of External Video in Your Project

Now that you have successfully converted your video to the correct compatible format, you can use it in your zoo kiosk project. You will have your project play each of the animal videos at the different labeled keyframes on the Timeline.

Your videos are independent of your Animate project. Keeping videos external ensures that you can edit them separately and that the videos can maintain different frame rates from your Animate project.

1. Open your 09_workingcopy.fla project in Animate CC.

2. Select the keyframe labeled penguins in the videos layer.

A screenshot shows a timeline with a keyframe being selected.

3. Choose File > Import > Import Video.

The Import Video wizard appears. This wizard guides you step by step through the process of adding video to Animate.

4. In the Import Video wizard, select On Your Computer and click Browse.

A screenshot shows the "Import Video wizard" with "Browse" button for the file path highlighted.

5. In the Open dialog box, select Penguins.mp4 from the Lesson09/09Start folder and click Open.

The path to the video file is displayed under the Browse button.

6. Select Load External Video With Playback Component. Click Next or Continue.


Image Tip

You can also select Embed H.264 Video In The Timeline to embed an H.264 encoded video to use as a guide for hand-drawn animation. Animators often use live-action video to guide their frame-by-frame drawings in a technique known as rotoscoping. The video appears on your Timeline but is not exported.


7. In the next screen, you choose the skin, or the style of the interface controls for the video. From the Skin menu, choose the third option from the top, MinimaFlatCustomColorPlayBackSeekCounterVolMute.swf, if it’s not already chosen.


Image Note

The skin is a small SWF file that determines the functionality and appearance of the video’s controls. You can use one of the skins provided with Animate, or you can choose None from the top of the menu.


A screenshot shows the "Import Video wizard" with "MinimaFlatCustomColorPlayBackSeekCounterVolMute.swf" from the "Skin menu" being selected.

The skins fall into three broad categories. The skins whose names begin with “Minima” are the latest designs and include options with a numeric counter. The skins that begin with “SkinUnder” use controls that appear below the video. The skins that begin with “SkinOver” include controls that overlap the bottom edge of the video. A preview of the skin and its controls appears in the preview window.

8. Click the Color box and select#333333 with 75% Alpha. Click Next or Continue.

A screenshot shows the "Import Video wizard" with the Color box for the "MinimaFlatCustomColorPlayBackSeekCounterVolMute.swf" displaying various color options.

9. On the next screen of the Import Video wizard, review the information for the video file, and then click Finish to place the video.

10. Your video with the selected skin appears on the Stage. Place the video on the left side of the Stage.

A screenshot shows three sound buttons labeled "Sound 1," "Sound 2," and "Sound 3." It also shows preview of a video.

An FLVPlayback component also appears in your Library panel.


Image Note

Although the component that plays video in an ActionScript 3.0 document is called FLVPlayback, it plays H.264 encoded video (MP4) and not FLV video.


A screenshot shows the "Library panel" with a play button shown in the middle.

11. Choose Control > Test. After the musical introduction, click the Magellanic Penguins button.

The FLVPlayback component plays the external penguin video with the skin you chose in the Import Video wizard. If your video does not play, check to make sure your MP4 video file is in the same folder as your FLA file. In the Properties panel, Component Parameters section, the Source item indicates the path to the video file.

Close the preview window.

A screenshot shows three sound buttons labeled "Sound 1," "Sound 2," and "Sound 3." It also shows preview of a video.

12. The other animal videos have already been encoded and provided in the 09Start folder. Import the Mandrill.mp4, Tiger.mp4, and Lion.mp4 videos in each of their corresponding keyframes and position them on the Stage in the same location as the Penguins.mp4 movie. Choose the same skin as the Penguin.mp4 video.


Image Note

The video files, the 09_workingcopy.swf file, and the skin file are all required for your zoo kiosk project to work. The skin file is published in the same folder as your SWF file.



Image Tip

You can’t preview your video on the Stage in Animate CC. You must test your movie (Control > Test) to see your video play within the video component.


Controlling the video playback

The FLVPlayback component lets you control which video plays, whether the video plays automatically, and other aspects of playback. The options for playback can be accessed in the Properties panel. Select the FLVPlayback component on the Stage and expand the Component Parameters section in the Properties panel.

A screenshot shows the "Component Parameters" dialog box.

Individual properties are listed in the left column, and their corresponding values are listed in the right column. Select one of the videos on the Stage, and then choose from among the following options:

autoPlay: When selected, the video plays automatically. When deselected, the video is paused on the first frame.

skinAutoHide: Select this option to hide the controller and display it only when users roll their mouse cursor over the video.

skin: This displays the name of your current skin file. Click the name to open the Select Skin dialog box and make another choice from the Skin menu.

skinBackgroundAlpha: To change the transparency of the skin, enter a decimal value from 0 (totally transparent) to 1 (totally opaque).

skinBackgroundColor: To change the color of the skin, click the color chip and select a new color.

source: This displays the name and location of the video file that Animate seeks to play. To change either of those, click the file information.

In the Content Path dialog box that appears, enter a new filename or click the Folder icon to choose a new file to play. The path is relative to the location of your Animate file.

Working with Video and Transparency

For the various animal videos, you want to show the entire frame with the animals in the foreground and the lush environment in the background. But sometimes you want to use a video file that doesn’t include a background. For this project, the zoo director was filmed in front of a green screen, which was later removed using Adobe After Effects. When you use the video, the zoo director appears to be in front of the Stage background. A similar effect is used for news weatherpersons, where the background of the video is totally transparent and can show weather graphics behind the person.

Transparencies in video (called alpha channels) are supported only in the FLV format using the On2 VP6 codec. Although the FLV format is no longer supported in Adobe Media Encoder CC, previous versions of Media Encoder can still export to FLV. When encoding a video with an alpha channel from previous versions of Adobe Media Encoder, be sure to choose Edit > Export Settings, click the Video tab, and then select the Encode Alpha Channel option.

You’ll import the video file, which is already encoded with an alpha channel in FLV format, into Animate for display with the playback component.

Importing the video clip

Now you’ll use the Import Video wizard to import the Popup.flv file, which has already been encoded with an alpha channel.

1. Insert a new layer called popup video above the videos layer.

2. Insert a keyframe at frame 51 and insert another keyframe at frame 86.

A screenshot shows the "Timeline panel" with a layer being renamed as "popup video."

You’ll place the video of the zoo director at the end of the musical introduction at the same time the stop action appears (frame 51). The keyframe at frame 86 ensures that the video of the zoo director disappears from the Stage when the animal videos appear.

A screenshot shows the "Timeline panel" with the layer "popup video" selected.

3. Select the keyframe at frame 51.

A screenshot shows the "Timeline panel" with the layer "popup video" selected.

4. Choose File > Import > Import Video.

5. In the Import Video wizard, select On Your Computer and click Browse. Select the Popup.flv file in the Lesson09/09Start folder and click Open.

6. Select Load External Video With Playback Component. Click Next or Continue.

7. Choose None for the skin. Click Next or Continue.

A screenshot shows the option "None" selected in the "Skin" section of the "Skinning" dialog box.

8. Click Finish to place the video.

The video of the zoo director with a transparent background appears on the Stage. Move the video so its bottom edge lines up with the top edge of the navigation bar. Make x=260 in the Properties panel.

A screenshot shows photo of a man selected.

9. Choose Control > Test.

After the musical introduction, the zoo director appears and gives a brief talk. If you click one of the animal video buttons, the popup video is removed from the Timeline. If your video does not play, make sure that your video file is in the same folder as your FLA project file.

A screenshot shows three sound buttons labeled "Sound 1," "Sound 2," and "Sound 3." It also shows a photo of a man.

Image Note

If you don’t stop one video before navigating to another keyframe containing a second video, the audio can overlap. One way to prevent overlapping sounds is to use the command SoundMixer.stopAll() to stop all sounds before starting a new video. The ActionScript in the first keyframe of the actions layer in your 09_workingcopy.fla file contains the correct code to stop all sounds before navigating to a new animal video.


Embedding Video

In the previous section, you used the FLVPlayback component to play an external video that’s in MP4 format, encoded in H.264. Another way to integrate video in Animate is to use embedded video. Embedded video requires the older FLV format and is best for only very short clips. The FLV file is saved in your library, and you can drag it from the Library panel when you want to place it on the Timeline. The video plays as long as there are sufficient frames on your Timeline.

Keep in mind the following limitations of embedded video: Animate cannot maintain audio synchronization in embedded video that runs more than 120 seconds. The maximum length of embedded movies is the maximum length of any timeline, which is 16,000 frames. Another drawback of embedding your video is the increase in the size of your Animate project, which makes testing the movie (Control > Test) a longer process and the authoring sessions more tedious.

Because the embedded FLV plays within your Animate project, it is critically important that your FLV have the same frame rate as your Animate file. If not, your embedded video will not play at its intended speed. To make sure your FLV has the same frame rate as your FLA, be sure to set the correct frame rate in the Video tab of Adobe Media Encoder. Since the FLV format is not supported in Adobe Media Encoder CC 2014 or later, you must use a previous version of Adobe Media Encoder to convert your video files to FLV. In this section, the FLV-formatted video file has already been prepared for you.

Embedding an FLV on the Timeline

You’ll import an FLV file into Animate and embed it on the Timeline.

1. Working in the file 09_workingcopy.fla, select the first frame of the popup video layer.

2. Choose File > Import > Import Video. In the Import Video wizard, select On Your Computer and click Browse. Select the polarbear.flv file in the Lesson09/09Start folder and click Open.

A screenshot shows the "Timeline panel" with the layer "popup video" selected.

3. In the Import Video wizard, select Embed FLV In SWF And Play In Timeline. Click Next or Continue.

A screenshot shows the "Import Video wizard" with "Embed FLV In SWF And Play In Timeline" from "Select Video" section selected.

4. Deselect Expand Timeline If Needed, and deselect Include Audio. Click Next or Continue.

A screenshot shows the "Import Video wizard" with "Include Audio" from "Embedding" section deselected.

5. Click Finish to import the video.

The video of the polar bear appears on the Stage. Use the Selection tool to move it to the left side of the Stage.

A screenshot shows three sound buttons labeled "Sound 1," "Sound 2," and "Sound 3." It also shows the preview of a video.

The FLV also appears in your Library panel.

6. Choose Control > Test to see the embedded video file play from frame 1 to frame 49.


Image Note

This video of the polar bear does not have audio. If you do have a video that contains audio, you will not be able to hear audio in the authoring environment for embedded videos. To hear the audio, you must choose Control > Test.


Using embedded video

It’s useful to think of embedded video as a multiframe symbol, very much like a symbol with a nested animation. You can convert an embedded video to a movie clip symbol, and then apply a motion tween to it to create interesting effects.

Next, you’ll apply a motion tween to the embedded video so it elegantly fades out just before the zoo director pops up and speaks.

1. Select the embedded video of the polar bear on the Stage; then right-click it and choose Create Motion Tween.

A screenshot shows the preview of a video with option "Create Motion Tween" being selected from the menu options.

2. An alert asks if you want to convert the embedded video to a symbol so it can apply a motion tween. Click OK.

A screenshot shows an alert message.

3. Animate asks if it should add enough frames inside the movie clip symbol so that the entire video can play. Click Yes.

A screenshot shows an alert message.

A motion tween is created on the layer.

A screenshot shows the "Timeline panel" with the layer "popup video" selected.

4. Right-click frame 30 of the popup video layer and choose Insert Keyframe > All (F6).

A screenshot shows the "Timeline panel" with the layer "popup video" selected. It also shows option "All" in the "Insert Keyframe" option selected.

5. While your playhead is still at frame 30, select the movie clip containing the embedded video on the Stage, and in the Properties panel, in the Color Effect section, choose Alpha from the Style menu and set the Alpha value at 100%.

A screenshot shows the "Color Effect" section with "Style" selected as "Alpha" and "Alpha" set as 100 percent.

6. Move the playhead on the Timeline to frame 50.

A screenshot shows the "Timeline panel" with the layer "popup video" selected.

7. Select the movie clip containing the embedded video on the Stage, and in the Properties panel, in the Color Effect section, change the Alpha value to 0%.


Image Note

To learn about exporting video to different formats for a variety of platforms see “Exporting video from Animate” in the Supplement to this lesson.


Animate inserts a new keyframe at frame 50 with the Alpha value for your selected movie clip at 0%. The instance fades out from frame 30 to frame 50.

8. Choose Control > Test to see the embedded video play and fade out.

Your interactive zoo kiosk is complete!

Review Questions

1. How can you edit the length of a sound clip?

2. What is a skin for a video?

3. What is the correct format for using video in an HTML5 Canvas document?

4. What is the correct video format if you want to embed a video in an ActionScript 3.0 or AIR document?

5. How do you export an Animate animation into a video that’s compatible with a specific device?

Review Answers

1. To edit the length of a sound clip, select the keyframe that contains it and click the Edit Sound Envelope button in the Properties panel. Then move the time slider in the Edit Envelope dialog box to clip the sound from the front or from the end.

2. The skin is the combination of functionality and appearance of video controls, such as Play, Fast Forward, and Pause buttons. You can choose from a wide array of combinations with the buttons in different positions, and you can customize the skin with a different color or level of transparency. If you don’t want viewers to be able to control the video, select None from the Skin menu.

3. To play video with the Animate video playback component, video files must be encoded in the H.264 format. Adobe Media Encoder CC, a separate application, allows you to import many kinds of media types, and trim, crop, and export to an H.264-encoded MP4 video file.

4. To embed video in an ActionScript 3.0 document, video files must be encoded in the FLV format, an older codec.

5. In Animate CC, you can export an animation as a video by choosing File > Export > Export Video. The video can be exported with or without the Adobe Media Encoder. In the Media Encoder, you can configure encoding options or choose Preset options that target various platforms, such as the Amazon Kindle, Barnes and Noble Nook, Apple iPhone, Google Android, and other devices.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.152.242