by Tom Green & Jordan L. Chilcott
www.peachpit.com
![]()
Excerpted from Macromedia Flash Professional 8: Training from the Source by Tom Green and Jordan L. Chilcott. © 2006. Used with the permission of Pearson Education, Inc. and Peachpit. To purchase this book, please visit www.peachpit.com.
by Tom Green & Jordan L. Chilcott
The first thing you have to understand about the use of video in Flash® is the original video must be converted to a format Flash can read. This format is FLV (Flash Video) and you can either use Flash, the Flash Video Encoder, or third-party software to create the FLV file. If you use video-editing software such as Adobe® After Effects®, you can also export the file as a FLV file. If you are a Dreamweaver® user, the current version of Dreamweaver—Dreamweaver 8—contains a feature that allows you to add an FLV at the click of a button.
The purpose of the Encoder, therefore, is to convert the video file to the FLV format. When you installed Flash Professional 8, the Flash Video Encoder application was also installed on your machine. If you also have QuickTime, Adobe After Effects, Avid Studio, or Final Cut Pro installed on your machine, they, too, were given the capability to use the Encoder when it was installed.
If you will be converting a video to the FLV format, the video must be in one of these formats:
Note: Don't be terribly surprised if, in certain instances, Flash imports the video but not the audio. For example, audio is not supported in MPG/MPEG files imported with QuickTime 4. In such cases, Flash displays a warning indicating that the audio portion of the file cannot be imported or the audio section will be dimmed in the Encoder.
For this exercise, you will use Flash's Video Wizard to import a video and format a video that will be placed in a Web page.
The wizard will be creating a FLV file for you and saving it to the same folder as the source video.
When you create this file use the default dimensions for the Stage, which are 550 by 400.
When creating video, a good habit to develop is to have the frame rate of the video and the Flash movie in which it will be placed match. Thus, you avoid having the video finish before the sound and other nasty issues that tend to crop up when there is no match. The frame rate can be changed in the Property inspector.

From here, you can navigate to MOMMAAND.MOV on your hard drive. The Video Import Wizard leads you through the import and conversion process. When the Select Video page of the wizard opens, click the Browse button and navigate to the folder containing the video. Select the file and click the Open button. The path appears, and you can click the Next button to open the Deployment page.

Note: The other option—Already deployed to a Web, FVS,S or Flash Comm server—assumes that the FLV file has already been created and is sitting on your Web server, a Flash Video Streaming Service server, or a Flash Communication Server.
A progressive download is a standard for Flash video being played from a Web server. In very simple terms, this means that as soon as enough of the video has downloaded into the SWF file on the Web page, the video plays. Depending on the length and quality of the video, this delay ranges from almost instantly to a few seconds.

Note: Only under the most extreme conditions should you even consider embedding a video into the SWF file and playing it from the Timeline. If the video is less than 15 seconds this practice is acceptable because the SWF file won't play until all the data has been loaded. This means the user is in for a long wait.
The list of quality options in the encoding profiles allows you to choose both the version of Flash Player to be used and a bit rate. Bit rate determines how fast the video data streams into the SWF file embedded in a Web page. The one chosen here is appropriate for broadband delivery. Low quality is best for dial-up situations, and high quality is ideal for highspeed and LAN connections.
Tip: The three sliders under the video preview can be used to trim the video. The top slider simply shows the position of the playhead in the video. Move it back and forth to scrub through the video. The two sliders under it can be used to set the in and out points for the video. For example, assume that the video has a couple of seconds of black before it starts. Drag the in point to the frame; when the video is encoded, that first couple of seconds of black screen will not appear. The slider on the right is the out point. Drag it to the left, and any video beyond this point will be ignored.

The skins, for all intents and purposes, are nothing more than a collection of 32 custom controller styles for the video. The one chosen places the controls under the video and makes them visible to the user. Pay close attention to their names. Each of the styles allows you to place the controller over the video—SteelOverAll.swf. In this case, the video appears on the Web page, and the controls appear only when the user rolls the mouse over the video. Other styles, such as SteelOverNoVol.swf, remove controls such as a volume slider from the controller. When you choose a skin, a preview of your selection appears in the page.
Tip: Note the minimum width in the Skinning page, which tells you the minimum Stage width required for the controller. This value can be set in the Property inspector. If the video is wider than the minimum value, you can ignore this direction.

The Finish Video Import page of the wizard gives you all the information you need regarding what happens next. It also tells you where the files it creates will be placed, how to link the video to the SWF file, and even allows you to access the Help file when the import is finished. If you make a mistake or need to change a setting, click the Back button.

When you click the Finish button, the FLV Encode Progress page appears, showing you the progress of the encoding process.

If a video is destined for a Web page, always set the Stage size to match that of the video. The unused portion of the Stage is nothing more than excess bandwidth. This video is 320 x 240, but the extra 30 pixels will accommodate the height of the controller under the video.



Inside the folder are a number of files:
The first three files—video.swf, SteelExternalAll.swf and MAMMAND.FLV—are the ones that have to be uploaded to the Web server. The one that gets placed in the Web page is Video.swf.
