Preparing to Embed Flash Video
The key to preparing to embed streaming Flash video on a web page is to pay attention to bandwidth. Bandwidth is the maximum amount of data that can be transferred via the Internet at one time. We all know that with the World Wide Web, there are countless amounts of data utilizing bandwidth at all times. If one web site shares a bandwidth with 10 video streams, the web site will take a longer time to pull up. This also is true if you have a huge amount of traffic viewing your video at the same time, which is the overall point right? So we must prepare our video for Flash so that we don’t miss out on the traffic we have worked so hard to drive to our site.
Example Embedded Flash Video
Flash and Video
As we mentioned earlier there are several ways to use Flash with a video file. If you plan to create a Windows Media Player or Quick Time movie. You would want to encode the file and link it to your Flash document. But if you choose to embed the file within your Flash document you will start by having the video file saved as either a Quick Time movie, mpeg or avi. If you choose to use Quick time you want to compress it using Quicktime Encoder. If you plan to use an avi file, you want to compress it using Windows Media 9 Encoder.
Begin the process by opening Flash, and going to Create a new document. Set the frame rate in the properties panel to 15 frames per second. Go to Modify > Document and change the Frame rate to 15. Let’s import our video file now. Choose File > Import and choose the video file. Flash will ask if you would like to embed or link the video file. Choose Embed Video and click OK. Make sure the quality you set for any video file you import in this fashion, is set to 80, and a keyframe interval of 50, a scale setting of 40. In the properties panel, Synchronize option with a ratio of 1:1, and select the Import Audio radio button. Finally click OK. Flash will compress the video with Sorenson Spark Basic, if it is a quicktime video or Intel Indeo if it is an avi formatted video. Flash will ask if you want to show the entire video in the timeline. Click yes once this is prompted.
Testing and Embedding the SWF File
Now we are ready to test our movie and create a SWF file. Go to Control > Test Movie to play the video in a test movie window. You will notice your video looping in the SWF test window. Looping is very effective for a business presentation website, where you want the same video to play without interruption. Now we want to add this movie to our website. We will open our HTML document. Put the cursor where you would like the embedded Flash video to display. Open the video file and go to Image source to copy and paste the code for the file. Go back to your HTML document and paste the code where you want the movie to be placed. Publish your HTML web document, and you should see the video embedded in the center of your website. Please make sure that the SWF file is in the same directory as your HTML document. Congratulations on your embedded web video!