building flash templates
Adding Video to Flash
12. Adding a video player to your project
Drag your playhead to the video section of your project, and click on the keyframe that is on the media layer. You are going to put your video on this keyframe.
From the window menu, click on components. This will open up the components window pane.
(picture shows additional components installed)
Components are pre-built items that can be used in your Flash project without a lot of knowledge of code or the technical aspects of Flash. The components found in this window are made available to you from Adobe, but you can install additional components from third-party vendors or Web sites.
One of the most popular components is the FLVPlayback component. This is a very basic video player that allows you to play Flash video (.FLV) files. This is overwhelmingly the most popular video format on the Web.
Drag the FLVPlayback component to the stage and position it where you want it. Your timeline should now show a solid keyframe in the "media" layer under frame 10.
This means that you have content (the FLV player) on this keyframe.
13. Converting your video to FLV
(NOTE: Adobe recently added support for a video codec called H.264 in Flash CS3. This means you will probably skip this step in the future and embed files that have been encoded with the H.264 codec directly from your video editing software. Since it's so new, support is still limited, so in this tutorial we show you how to convert to FLV.)
Included in the Adobe Flash package is a program called “Adobe Flash CS3 Video Encoder.” (With Flash 8 this folder will be called "Macromedia Flash 8 Video Encoder") This simple program encodes most video types to .FLV or Flash Video.
Launch the program.
There are several ways to add videos to this program. By far the simplest method is to drag videos to the main source area. You can also click the “ADD” button and select the video file.
Next, click the “settings” button. While the settings vary depending on the situation, here are some recommended settings for general performance:
Codec: On2 VP6
Deinterlace: Checked if the footage is shot on non-HD or non-progressive.
Frame Rate: Same as source
Quality: High if a short video, Medium if longer
Audio: Encode between 96 to 128kbps
You can also use the Crop and Resize options to trim the length of the video you want to encode or to crop into the sides. The Resize option is especially important as you should always encode your video for the same size as the output, however resizing your video in the encoding process will add considerable encoding time per video (three to five times as long as the video itself).
(Note this window appears differently in Flash 8. The same settings are available in the older version, however.)
To begin encoding, click Start Queue in the main window. You can batch encode several videos, but the video encoder will only do one at a time.
14. Setting the Video path in Flash
Once you have encoded your .FLV file, go into Flash and set the source path so that the FLV player knows which video to play. Set the source path by clicking on the FLV Player in your Flash project, and then clicking "Parameters" in the property inspector. (In Flash 8, open the Component Inspector window open to find these settings. The Component Inspector can be found under the Window menu.)
You will notice there are several features you can modify in the FLV Player, including the skin (scrubber) and the color. Once option says "contentPath" this is where you set the FLV file you just created.