How to Embed a Video into Flash in the Time Line

There are downsides to embedding a video into the timeline. It becomes part of your swf, thereby adding to overall file size. Long videos (16000 frames) may not synch audio and video properly. And testing the movie can take time. Finally—and most importantly—quality, especially audio, can suffer.

Embedding a video allows you make it a lot more interactive for your viewers than just clicking play. You can place invisible buttons in a video, tween the buttons so that they track what’s underneath them, and add actions (like coach marks and captions) to them. The result is a video that users can not merely start, stop, or even scrub but can genuinely interact with. Your imagination is the constraining factor.

There is a work around for the downsides of embedding a video. Click here when you’re really ready to create an annotated video and put it on the Web. The instructions that follow work but the quality won’t be as good.

Here’s how to embed a video in the timeline:

Select File>Import>Import Video.

Select Video: Browse to the video you want to import.

Click Continue.

Deployment: Choose your method. For embedding it on the timeline, choose Embed video in SWF and play in timeline. Flash will warn you, but, hey, this is a free country.

Click Continue.

Embedding: Choose the following:

The symbol type how you want the video to be embedded—here “embedded video”;

whether you want the audio track integrated or separate—select Integrated;

if Flash should place an instance on the Stage—enable the checkmark;

if Flash should expand the timeline so that all the frames are displayed;

Whether you want to embed the entire video as is or if you want to edit it first.

The latter option allows you to trim the movie’s duration or to break the movie up into more than one clip. It’s probably easier to do your editing outside of Flash but decide for yourself.

Click Continue.

Encoding: Choose a preset or Click Show Advanced Settings to set the following options:

Encoding Tab
alpha channel (that must be done when you create your movie; here you’re only enabling it—if you aren’t sure what you’re doing, skip this setting)
Frame rate; resizing; video quality; key frame; audio data rate—set it to 192 kbps

Cue Points
Note: I don’t think there’s much advantage in setting cue points in an embedded movie, whose major feature is adding interactivity well beyond just jumping to a specific spot. Moreover, you’ll have to add your own controller anyway. But I could be wrong. If you do opt for this, follow these steps:

In the preview of the video you’re importing, move the play head to where you want the first cue point.

Click the + button on the left side of the screen.

Flash inserts a default name (New Cue Point) and the time where the play head currently is.

In the drop down menu, select Navigation.

Repeat these steps, adding cue points with unique names.
See the Using Cue Points section below.

Crop and Trim:
Crop the the video to change what will be visible by adjusting the horizontal and vertical sliders.
Trim the video so that only a specific duration of it will be encoded and played. Set the Start and End points by moving the triangles under the preview scrubber

Click Continue.

Finish Video Import—-Flash gives you an overview of your settings and what files you have to copy to your web server. Review your settings and go back if you have to. You can also choose to view video help topics after Flash finishes importing.

Click Finish.
Flash starts encoding, reports it progress, and places video on stage.

You’ll have to provide your own controller for an embedded movie; the Flash components (and their skins) won’t work. Click here to add simple Stop and Pause buttons.

Test your movie.

Upload the main swf to your server. Unlike uploading streaming video, the main swf is the only file to worry about.

The Flash 8 Video Encoder
The Video Encoder is a separate application that ships only with Flash Pro. It allows batch encoding of files, which improves your work flow.

This application uses the same compression dialog window as in the previous section.

Leave a Reply