CO.CC:Free Domain
Google
Custom Search
Monday, July 7, 2008

Video in Flash

Video on the web is one of the most exciting (and high bandwidth) kinds of content out there. And Flash has not forgotten this in Flash Professional 8. With a streamlined import wizard and the capability to cut segments from imported videos, Flash has never looked better when it comes to video integrationespecially now that Flash has full support for the alpha channel in video, allowing you to completely remove the background.

Importing Video into Flash
Video can play natively inside the Flash 8 player or can be brought in at runtime as either a stream (if you have a streaming server) or progressive download. The video formats Flash supports are as follows: DV, MPEG, WMV, MOV, AVI, and Flash Video FLV.
To import a video, follow these steps:

1.
Select File, Import, Import Video.
2.
When the Video Import Wizard pops up click Browse and choose any video you want (or use one from the companion site). Notice, however, that you can also map to videos that are out on the web.
3.
Click Next and the next screen asks you how you want to deploy video. For this chapter, choose Embed Video in SWF and Play in Timeline.
4.
The Embedding window enables you to choose different options for the symbol type. Set this to Movie Clip so it will work with a later example. You can also choose whether you want the audio either integrated into the video or as a separate file. And you can choose to place an instance of it on the stage and stretch the timeline. Finally, in this section, you can choose to edit your video before you import it, so choose that option and click Next.
5.
In the video's progression bar, the top arrow represents the position in the video you are viewing, and the bottom two bars represent the starting and ending points of the segment of the video you would like to create. You can use the controls to go through and preview your selection, and then use the Create a New Clip in the List button (the plus sign in the top left) to make the video slice, which will then appear in the video list box.
6.
After you have made the slice you want, click Next to get to the Encoding section. This section enables you to select the type of encoding, including quality and player, because the Flash 8 player has a different video codec than the Flash 7 player. This means that if your intended audience has the Flash 7 player, and you choose the Flash 8 player, errors will occur, and users with the older player will not be able to view all your content. Also in this section are some more options. If you click the Show Advanced Settings button. This is where you can set it to encode the alpha channel, so keep that in mind. Click Next when you have the settings you like.
7.
Where the only option is whether you want video help files to pop open when the video is done encoding. Go ahead and click Finish.
Play around with different video settings until you find the right settings for you and your audience, especially when it comes to quality versus file size.
When the video is done importing, a movie clip will appear on the stage with the video embedded into it. And in the library, you will see both the movie clip and the video object. If you test now, the video will play right through, so the next example will take it a step further by showing how easy it is to add controls.
CREATING CONTROLS TO PLAY AND STOP VIDEO
In this exercise, we will be working from the previous example:
Test your movie. Notice that it takes a second to export. In a real-world situation, you would create a preloader to overcome the blank space while waiting for content to load.

You can also add fast-forward and rewind buttons using the goto action. This should give you a good understanding of how video is handled in Flash. Remember, you always have the options of animating, scaling, and rotating the video, just to name a few. In fact, if you're not satisfied with the quality of the video, you might consider taking down the alpha of the video, which seems to take away some of the compression artifacts.

0 komentar: