Accessibility

Flash Article

 

Presenting video with the Flash video component in Dreamweaver CS3


Table of Contents

Embedding Flash video into a web page

In this exercise, you insert an FLV file with a controller into a supplied web page in several easy steps.

You have two options when you insert and display an FLV file in your HTML documents using the Flash video component:

  • Progressive download video: If you choose this video type, the video is downloaded to the user's hard drive and starts playing before it fully downloads. The video is downloaded from beginning to end, unless the user closes the connection before the download is complete. The user must have Adobe Flash Player 6 r65 (or later) installed to see videos encoded with Sorensen Spark (included with Flash MX Professional 2004 or later). The user must have Flash Player 8 or later installed to see videos encoded with the On2 VP6 codec (included with Flash 8 or later). For more information on which versions of Flash Player work with the different video codecs, search "on2 VP6 video codec"(include the quotes) in Flash CS3 Professional Help (press F1). If you don't have a copy of Flash, seach the Flash LiveDocs.

    Note: The FLV video included with the article source files uses the Sorenson Spark codec and can be viewed with Flash Player 6 r65 or later.

  • Streaming video: If you choose this option, the video starts playing after a short buffer period, when a small amount of data downloads to the computer to ensure smooth playback. You must have Adobe Flash Media Server or a Flash Video Streaming Service available if you select this option. The user must have Flash Player 6 (or later) installed to see your video, too. For more details about streaming video, see the Flash Media Server Developer Center.

    Note: For more information on using video on the web, see the Flash video learning guide.

Depending on which video type you select in the pop-up menu, the following steps will vary slightly. This tutorial assumes you've chosen the Progressive Download Video option to display your video files:

  1. Launch Dreamweaver CS3. The first thing to do is define a Dreamweaver site for the supplied files. Doing so will allow Dreamweaver to accurately insert relative paths from the HTML page to the Flash video files.
  2. Choose Site > New Site from the menu options. In the Site dialog box that opens (see Figure 3), set the Site Name field to Farm and browse for the \farmsite subfolder in the farm folder on your desktop, and then click OK.

    Site Definition dialog box for setting up the Farm site containing the supplied files

    Figure 3. Site Definition dialog box for setting up the Farm site containing the supplied files

  3. Choose File > Open from the main menu and select the video01.html file within the chickens folder.
  4. In either Design view or Split view, position your cursor within the editable content region and delete any existing text, such as [insert video here].
  5. Select Insert > Media > Flash Video from the main menu to launch the Flash video component.
  6. Select Progressive Download Video from the Select Video Type pop-up menu. The appearance of the Insert Flash Video dialog box changes to show the following options for this format (see Figure 4):

    • URL: Specifies the URL of the FLV file to embed in your HTML document
    • Skin: Specifies the URL of the skin to load
    • Width: Specifies the width of FLV display
    • Height: Specifies the height of FLV display
    • Constrain: Maintains the aspect ratio of the video if the width or height text boxes change the corresponding value
    • Detect Size: Detects the dimensions of the FLV file and automatically populates the Width and Height text boxes
    • Auto play: Specifies whether you play the video when the web page opens
    • Auto rewind: Specifies whether the playback control returns to the starting position after the video finishes playing
    • Prompt users to download Flash Player if necessary: When selected, this option embeds the required JavaScript code to detect the users' Flash Player version and prompts them to download a newer version, if necessary (if you do not select this option, the Message text box is disabled)
    • Message: Displays a message if a user's current Flash Player version isn't high enough to view the Flash content

    Specifying your options in the Flash Video dialog box

    Figure 4. Specifying your options in the Flash Video dialog box

  7. Click the Browse button next to the URL text box. Navigate to the \farmsite directory on your hard drive, select chicken01.flv from the videos folder, and click OK. Note that if you have not created a Dreamweaver site for the supplied files, Dreamweaver will insert paths relative to your local computer. If you encounter this issue, either create a site or type in the paths by hand, as shown in Figure 4.
  8. Select a skin from the Skin pop-up menu. For this exercise, select Clear Skin 3. The area below the Skin pop-up menu shows you a small preview of the specified skin's controller. Figure 5 shows the player skin in action.

    The chicken01.flv file displayed with the Clear Skin 3 skin option 

    Figure 5. The chicken01.flv file displayed with the Clear Skin 3 skin option

  9. Click the Detect Size button so Dreamweaver calculates the width and height of the current FLV file automatically, and then populates the text boxes with the correct dimensions of the video.
  10. Select the Auto Play check box if you want the video to play automatically after the page loads. You need to ensure that the Auto Rewind check box is enabled if you want the video to return to the first frame after it completes.
  11. Deselect the Prompt Users to Download Flash Player If Necessary option. The reason is that the Insert Flash Video wizard prompts an error from Dreamweaver when this option is selected. This is a known issue with the Insert Flash Video wizard whenever you use it inside an editable area of a Dreamweaver template.

    Note: For more information on this issue, please see the following TechNote: Cannot insert Flash Video in template child pages.

  12. Click OK to apply your settings. Dreamweaver will now generate and insert code that embeds the selected video into this web page.