The use of video in Flash 8 has improved from earlier versions of Flash, and the number of websites using FLV has dramatically increased over the years. There are many options to make edits to video before you import video into a FLA document, or load FLV into a SWF file. There are also greater controls for video compression in Flash 8 and Flash 8 Video Encoder. Compressing video carefully is important because it controls the quality of the footage and the size of the file. Video files, even when compressed, are large in comparison with most other assets in your SWF file.
Note: Remember to provide the user with control over the media in a SWF file. For example, if you add audio to a document with video (or even a looping background sound), let the user control the sound.
Before you import video into Flash, consider what video quality you need, what video format you want to use with the FLA file, and how you want it to download. When you import video into a FLA file (called embedded video), it increases the size of the SWF file that you publish. This video starts progressively downloading to the user's computer whether or not they view the video.
You can also progressively download or stream the video at runtime from an external Flash Video (FLV) file on your server. When it starts downloading depends on how you structure your application.
Note: Video progressively downloads from the server like SWF files, which is not actually streaming. Even dynamically loading content has distinct advantages over keeping all your content in a single SWF file. For example, you will have smaller files and quicker loading, and the user only downloads what they want to see or use in your application.
You can display external FLV video using a component or a video object. A component makes developing applications with FLV video easy, because the video controls are pre-built, and you only need to specify a FLV file path to play the content. If you need to keep your SWF file the lowest possible size, you can display video in a Video object and create your own assets and code to control the video. You can also consider using the FLVPlayback component in Flash Professional 8, which has a much smaller file size than Media components (Flash MX Professional 2004 and later.)
Remember to give users a certain amount of control (such as the ability to stop, pause, play, and resume the video, and control volume) over the video in a SWF file. For more information on using video in Flash, see Working with Video (Using Flash > Working with Video) or About Using FLV Video (Learning ActionScript 2.0 in Flash > Working with Images, Sound, and Video > About Using FLV Video) in Flash Help or the Flash 8 LiveDocs.
You might need certain kinds of flexibility over your video, such as manipulating the video with animation, or syncing various parts of it with the Timeline. In these kinds of scenarios, you should embed your video in the SWF file rather than loading it using ActionScript or one of the Media components.
If you need more control over a video instance than the Video class allows, a best practice is to place video inside a movie clip instance. The video's Timeline plays independently from a Flash Timeline, and you can best control timelines by placing the content inside a movie clip. You do not have to extend your main Timeline by many frames to accommodate for the video, which can make working with your FLA file difficult.
You can export FLV files from Flash Basic 8 and Flash Professional 8 authoring environments. After you import video into your document, it appears as a video symbol in the library. To export the video as FLV, select the video and then select Properties from the Library options menu. Click Export in the Embedded Video Properties dialog box to make your export settings.
Flash Professional 8 includes the Flash 8 Video Encoder and the FLV QuickTime Export plug-in. The QuickTime Exporter compresses video from third-party video editing software such as Apple QuickTime Pro and Adobe After Effects. You can also use Flash 8 Video Encoder, which is a stand-alone application that you can use to create FLV files. Because you have a lot of control over the export settings, the quality of the FLV file that is created using either of these tools is better than video exported directly from Flash.
When you compress video, remember the following recommendations:
When you put FLV files on a server, they use the FLV MIME type video/x-flv. If you have difficulty viewing FLV files after you upload your files, check that this MIME type is set on your server. FLV files are binary, and some applications that you build might require that the application/octet-stream subtype is also set. For more information, read the Flash Player specifications.
For more information about FLV files on a server, see About Configuring FLV Files for Hosting on a Server in Flash Help or the Flash 8 LiveDocs (Learning ActionScript 2.0 in Flash > Working with Images, Sound, and Video > About Using FLV Video > About Configuring FLV Files for Hosting on a Server).
It's possible to create an application and then run into problems once you upload it to your server.
Note: For Flash Player and FLV compatibility, see About Using FLV Video in Flash Help or the Flash 8 LiveDocs (Learning ActionScript 2.0 in Flash > Working with Images, Sound, and Video > About Using FLV Video).
/video/water.flv), try using absolute paths (such as http://www.helpexamples.com/flash/video/water.flv). If your application doesn't work as a relative path, but does work as an absolute path, you then know that you need to correct the relative path.