What is Software? | What is Education? | What is Technology? | What is Research? | What is Wi-Fi? | What is Communication? | What is Customer Service?

Free SEO Tutorials & Help

Tutorials:   Adobe Flash   Adobe Photoshop   CorelDRAW   SEO  

Site Map

Website Development | Cable & Broadband Magazine | Solutions for Higher Education | Auction Anything Online

Adobe Flash Help & Tutorials

 Back to Topics

 

How to Work With Video in Flash

About video features in Flash

About using video in Flash

About progressively downloading video

About streaming video using Flash Communication Server

About embedding video in a SWF file

About Linked QuickTime video

Video and the Property inspector

About digital video and Flash

Supported file formats for video

About the On2 VP6 and Sorenson Spark video codecs

Comparing the On2 VP6 and Sorenson Spark video codecs

About encoding video

Tips for creating Flash video

Importing video using the Video Import wizard

Importing video for progressive download (Flash Professional only)

Importing video for streaming with Flash Communication Server or FVSS (Flash Professional only)

Embedding video in a SWF file

Importing linked QuickTime video files

Changing the directory path of a linked QuickTime video

Editing video clips in the Video Import wizard

Selecting a video encoding profile

Specifying advanced encoding settings (Flash Professional only)

Specifying advanced audio encoding settings

Embedding cue points (Flash Professional only)

Cropping and trimming video

Importing Flash Video files into the Library

About playing back external FLV files dynamically

Changing the properties of a video clip

Controlling video playback using behaviors

Using the FLVPlayback component (Flash Professional only)

Specifying the contentPath parameter

About controlling video playback using the Timeline

Media components (Flash Player 6 and 7)

 

About video features in Flash

TOP

Macromedia Flash Basic 8 and Macromedia Flash Professional 8 provide several ways for you to include video in your Flash documents. How you choose to deploy your video will determine how you create your video content, and how you integrate it for use with Flash. This section describes different video features in Flash, and how you can use them to incorporate video content.

Flash provides several methods for integrating and delivering video content. The ways in which you can incorporate video into Flash are:

Streaming video content Flash lets you host video files using Flash Communication Server, a server solution optimized for the delivery of streaming, real-time media. You can import video clips stored locally into your Flash documents, and later upload them to the server. This allows you to more easily assemble and develop Flash content. You can also use the new FLVPlayback component or ActionScript to control video playback and provide intuitive controls for users to interact with the video.

You can host your own Flash Communication Server, or, you can use a hosted Flash Video Streaming Service (FVSS). Macromedia has partnered with several content delivery network (CDN) providers to offer hosted services for delivering on-demand Flash Video across high-performance, reliable networks. Built with Flash Communication Server and integrated directly into the delivery, tracking, and reporting infrastructure of the CDN network, FVSS provides the most effective way to deliver Flash Video to the largest possible audience without the hassle of setting up and maintaining your own streaming server hardware and network.

For information on streaming video from Flash Communication Server, or a hosted FVSS.

Progressively downloading video from a web server If you don't have access to Flash Communication Server or FVSS, you can still enjoy the benefits of downloading video from an external source when you use progressive downloading. Progressively downloading a video clip from a web server doesn't provide the same real-time performance that Flash Communication Server does; however, you can use relatively large video clips, and keep the size of your published SWF files to a minimum. You can also use the new FLVPlayback component or ActionScript to control video playback and provide intuitive controls for users to interact with the video. For information on streaming video from Flash Communication Server.

Importing embedded video You can import video clips into Flash as embedded files. As with an imported bitmap or vector artwork file, an embedded video file becomes part of the Flash document. for this reason, you can only import very short duration video clips. For information on file formats supported for importing embedded video.

Importing video in QuickTime format You can import video clips in QuickTime format as linked files. Flash documents that contain linked QuickTime video must be published in QuickTime format. A linked video file does not become part of the Flash document. Instead, the Flash document maintains a pointer to the linked file. For more information.

Importing FLV files in the Library You can import video clips in Macromedia Flash Video (FLV) format directly into Flash. When you import FLV files, you use the encoding options already applied to the files. You do not need to select encoding options during import. For more information.

There are several options for controlling the playback of video files:

Using the FLVPlayback component New to Flash Professional 8, the FLVPlayback component lets you quickly add a full-featured FLV or MP3 playback control to your Flash movie. FLVPlayback provides support for both progressive downloading and streaming FLV files. FLVPlayback lets you easily create intuitive video controls for users to control video playback, as well as the ability to apply premade skins, or to apply your own custom skins to the video interface.

Controlling external video playback using ActionScript You can play back external FLV files in a Flash document at runtime using the NetConnection and NetStream ActionScript objects.

You can use video behaviors (prewritten ActionScript scripts) to control video playback.

Controlling video playback in the Timeline If you are comfortable with ActionScript, you can write custom ActionScript to control video playback. You can play or stop a video, jump to a frame, and control video in other ways. You can also display a live video stream from a camera.

 

About using video in Flash

TOP

Adobe Flash lets you incorporate video into your Flash movie in several different ways, depending on the type of video content you are delivering and your intended application. The following sections discuss different methods of incorporating video content into Flash:

  • About progressively downloading video

  • About streaming video using Flash Communication Server

  • About embedding video in a SWF file

  • About Linked QuickTime video

 

About progressively downloading video

TOP

Progressive downloading lets you use ActionScript to load external FLV files into a SWF file, and play them back at runtime. More specifically, you can use the netConnection and netStream objects to initiate playback of the FLV file, and to control the Play, Pause, and Seek behaviors, as well as the buffer time and size for a given video file.

Because the video content is kept external to the other Flash content and the video playback controls, it's relatively easy to update video content without republishing the SWF file.

Progressive downloading provides the following advantages over embedded video:

  • During authoring, you need to publish only the SWF interface for previewing or testing part or all of your Flash content. This results in faster preview times and quicker turnaround on iterative experimentation.
  • During delivery, video begins playing as soon as the first segment has been downloaded and cached to the local computer's disk drive.
  • At runtime, video files are loaded from the computer's disk drive into the SWF file, with no limitation on file size or duration. There are no audio synchronization issues or memory restrictions.
  • The frame rate of the video file can be different from the frame rate of the SWF file, allowing for greater flexibility in authoring a movie.

 

About streaming video using Flash Communication Server

TOP

Streaming video from either your own server running Flash Communication Server or from a host FVSS provides the most complete, consistent, and robust delivery option for both audio and video files. In streaming, each Flash client opens a persistent connection to the Flash Communication Server, and there is a controlled relationship between the video being delivered and the client interaction. Flash Communication Server lets you use bandwidth detection to deliver video or audio content based on the user's available bandwidth. This lets you provide different content for users based on their ability to easily access and download content. For example, if a user with a dial-up modem accesses your video content, you can deliver an appropriately encoded file that doesn't require too much bandwidth.

Flash Communication Server also provides you with quality of service metrics, detailed tracking and reporting statistics, and a range of interactive features designed to enhance the video experience. As with progressive downloading, the video content (FLV file) is kept external to the other Flash content and the video playback controls. This lets you easily add or change content without having to republish the SWF file.

Streaming video with Flash Communication Server or FVSS provides the following advantages over embedded and progressively downloaded video:

  • Video playback starts sooner than it does using other methods of incorporating video.

  • Streaming uses less of the client's memory and disk space, because the clients don't need to download the entire file.

  • Network resources are used more efficiently, because only the parts of the video that are viewed are sent to the client.

  • Delivery of media is more secure, because media does not get saved to the client's cache when streamed.

  • Streaming video provides better tracking, reporting, and logging ability.

  • Streaming lets you deliver live video and audio presentations, or capture video from a web cam or digital video camera.

  • Flash Communication Server enables multiway and multiuser streaming for video chat, video messaging, and video conferencing applications.

  • By programmatically controlling video and audio streams (using server-side scripting), you can create server-side play lists, synchronized streams, and more intelligent delivery options based on the client's connection speed.

 

About embedding video in a SWF file

TOP

Embedded video lets you embed a video file within a SWF file. When you import video in this way, the video is placed in the Timeline where you can see the individual video frames represented in the Timeline frames. As with an imported bitmap or vector artwork file, an embedded video file becomes part of the Flash document.

When you create a SWF file with embedded video, the frame rate of the video clip and the SWF file must be the same. If you use different frame rates for the SWF and the embedded movie clip, playback will be inconsistent. If you need to use variable frame rates, import the video using either progressive download or Flash Communication Server as your delivery options. When you import movies using either of these methods, the FLV files are self-contained and run at a frame rate separate from that of all other Timeline frame rates included in the Flash movie.

You can import video clips into Flash as embedded files in QuickTime video (MOV), Audio Video Interleaved file (AVI), Motion Picture Experts Group file (MPEG), or other formats, depending on your system. For information on file formats supported for importing embedded video.

Embedded video works best for smaller video clips, with a playback time of less than 10 seconds. If you are using video clips with longer playback times, consider using progressively downloaded video, or streaming video using Flash Communication Server.

The limitations of embedded video include:

  • When embedding video files, you might encounter problems if the resulting SWF files get excessively large. Flash Player reserves a lot of memory when downloading and attempting to play large SWF files with embedded video, and this can in fact cause Flash Player to fail.

  • Longer video files (over 10 seconds in length) often have synchronization issues between the video and audio portions of a video clip. Over time, the audio track begins playing out of sequence with the video, causing a less than desirable viewing experience.

  • To play a video embedded in a SWF file, the entire movie must be downloaded before the video will start to play. If you embed an excessively large video clip, it may take a long time for the SWF file to download in its entirety and for playback to start.

 

About Linked QuickTime video

TOP

Using Flash, you can create QuickTime movies (MOV files) that can be played back by users who have the QuickTime plug-in installed on their computers. This is often done when people use Flash to create title sequences or animation for use as video content. The published QuickTime file can be distributed as a DVD, or incorporated into other applications such as Macromedia Director or Adobe Premiere.

When using Flash to create a QuickTime video clip, you can link to a QuickTime video from the Flash file rather than embed the video in the Flash file. A linked QuickTime video imported into Flash does not become part of the Flash file. Instead, Flash maintains a pointer to the source file.

If you are creating a QuickTime video using Flash, your publish setting must be set to Flash 3, 4, or 5. You cannot display a linked QuickTime video in SWF format. The QuickTime file contains a Flash track, but the linked video clip remains in QuickTime format.

NOTE : Importing a video clip as linked QuickTime means that the resulting content can only be published as a QuickTime MOV file. You cannot publish content using a linked QuickTime video as a SWF file.

 

Video and the Property inspector

TOP

You can use the Property inspector and the Embedded Video Properties dialog box to modify embedded and linked video clips. The Property inspector lets you give the clip an instance name; change the width, height, and registration points; and swap a video clip with another video clip. The Embedded Video Properties dialog box lets you rename a video clip, update an imported video that you have edited in an external application, or import another video to replace the selected clip.

 

About digital video and Flash

TOP

Flash provides support for several different video codecs, and provides tools for encoding video into the Flash Video (FLV) format. In general, the preset video encoding profiles included in the Flash Video Import wizard and the Flash 8 Video Encoder (Flash Professional only) provide you with the optimum playback quality based on the bandwidth of the audience you're targeting. If you are using Flash Professional 8, you can also customize your encoding settings using the advanced encoding settings options available in both the Flash Video Import wizard and the Flash Video Encoder.

 

Supported file formats for video

TOP

If you have QuickTime 7 for Apple Macintosh, QuickTime 6.5 for Windows, or DirectX 9 or later (Windows only) installed on your system, you can import video clips in several file formats, including MOV, AVI, and MPG/MPEG. You can import linked video clips in MOV format.

Flash documents with embedded video can be published as SWF files. Flash documents with linked video must be published in QuickTime format. For more information, see About Linked QuickTime video.

The following video file formats are supported for importing embedded video if QuickTime 7 is installed:

File type

Extension

Audio Video Interleaved

.avi

Digital video

.dv

Motion Picture Experts Group

.mpg, .mpeg

QuickTime video

.mov

The following video file formats are supported for importing embedded video if DirectX 9 or later is installed (Windows only):

File type

Extension

Audio Video Interleaved

.avi

Motion Picture Experts Group

.mpg, .mpeg

Windows Media file

.wmv, .asf


By default, Flash imports and exports video using the On2 VP 6 codec. A codec is a compression/decompression algorithm that controls how multimedia files are compressed during encoding, and decompressed during playback. For information on the On2 VP 6 video codec.

If you attempt to import a file format that is not supported on your system, a warning message is displayed indicating that the operation cannot be completed. In some cases, Flash might import the video but not the audio in a file. For example, audio is not supported in MPG/MPEG files imported with QuickTime 7 on the Macintosh. In such cases, Flash displays a warning indicating that the audio portion of the file cannot be imported. You can still import the video without sound. For more information on audio support in MPEG video.

About audio support for MPEG video

Because MPEG encodes both the video and audio portions of a file into a single track, encoding MPEG files as FLV files may result in the audio portion being removed (or "dropped"). This occurs primarily when encoding video files into FLV format on the Macintosh platform. On the Macintosh, MPEG video is imported using QuickTime. QuickTime does not support extracting audio content from MPEG files (although QuickTime will correctly play back an MPEG file with audio programming).

If you are encoding MPEG video with audio on a Macintosh, it is recommended that you first convert the MPEG video clip into another format that encodes audio and video as separate tracks within the file. You can then encode the other format as an FLV file, and preserve the audio content.

Another alternative is to use a computer with the Windows operating system. Windows imports MPEG video using DirectShow, which supports extracting both the video and audio tracks of an MPEG file. This lets you convert MPEG video to the FLV format without removing the audio portion of the video clip.

NOTE : Imported audio is published or exported as streamed audio, using the global audio streaming settings selected in the Publish Settings dialog box. For more information, see Setting publish options for the Flash SWF file format.

 

About the On2 VP6 and Sorenson Spark video codecs

TOP

By default, Flash Video Encoder exports encoded video using the On2 VP6 video codec for use with Flash Player 8, and the Sorenson Spark codec for use with Flash Player 7. A codec is a compression/decompression algorithm that controls how video files are compressed during encoding, and decompressed during playback. The On2 video codec is the preferred video codec to use when creating Flash content that uses video. On2 provides the best combination of video quality while maintaining a small file size.

If your Flash content dynamically loads Flash video (using either progressive download or Flash Communication Server), you can use On2 VP6 video without having to republish your SWF for Flash Player 8, as long as users use Flash Player 8 to view your content. By streaming or downloading On2 VP6 video into Flash SWF versions 6 or 7, and playing the content using Flash Player 8, you avoid having to recreate your SWF files for use with Flash Player 8.

CAUTION : Only Flash Player 8 supports both publish and playback of On2 VP6 video.
 

Codec

Content (SWF) version (publish version)

Flash Player version (version required for playback)

Sorenson Spark

6

6, 7, 8

7

7, 8

On2 VP6

6

8

7

8

8

8

 

 

Comparing the On2 VP6 and Sorenson Spark video codecs

TOP

The On2 VP6 codec is the default video codec to use when encoding FLV content for use with Flash Player 8. The On2 VP6 codec provides:

  • Higher quality video when compared to the Sorenson Spark codec encoded at the same data rate

  • Support for the use of an alpha channel to composite video

In order to support better quality video at the same data rate, the On2 VP6 codec requires noticeably slower to encode and requires more processor power on the client computer to decode and play back. For this reason, you should carefully consider the lowest common denominator of computer you intend your viewing audience to use when accessing your Flash Video content.

If you anticipate a large user base that is using older computers, it may be advisable to encode your FLV files using the Sorenson Spark codec.

 

About encoding video

TOP

Flash provides several video encoding solutions that let you encode your video clips into the FLV format.

Flash Video Import wizard The Flash Video Import wizard lets you encode video clips into the Flash Video (FLV) format when you import them. However, the Video Import wizard has limitations in that you can only encode one video clip at a time, and the process of encoding can be both time- and computing-intensive.

For users who work extensively with video-based content, Flash Professional 8 includes the Flash 8 Video Encoder and the QuickTime Exporter.

NOTE : Flash Basic 8 only provides video encoding for use with embedded video.

Flash Video Encoder lets you batch process video clips, allowing you to encode several clips at a time without having to interrupt your workflow. In addition to selecting encoding options for video and audio content, the Flash 8 Video Encoder also lets you embed cue points into video clips you encode, and edit the video using crop-and-trim controls.

For more information, see the online help included with the Flash 8 Video Encoder application.

FLV QuickTime Export plug-in If you have Macromedia Flash Professional 8 and QuickTime 6.1.1 installed on your computer, you can use the FLV QuickTime Export plug-in to export FLV files from supported video-editing applications. You can then import these FLV files directly into Flash to use in your Flash documents.

The following video-editing applications are supported by the FLV Export plug-in:

  • Adobe After Effects (Windows and Macintosh)

  • Apple FinalCut Pro (Macintosh)

  • Apple QuickTime Pro (Windows and Macintosh)

  • Avid Xpress DV (Windows and Macintosh)

Using the FLV QuickTime Export plug-in to export FLV files from either Flash 8 Video Encoder or video-editing applications significantly streamlines the process of working with FLV files in your Flash documents. With the FLV Export plug-in, you can select encoding options for video and audio content as you export, including frame rate, bit rate, quality, and other options. You can import FLV files directly into Flash without needing to re-encode the video after import.

 

Tips for creating Flash video

TOP

How you compress your video is largely determined by the content of the video. A video clip of a talking head with little action and only short bursts of moderate motion compresses differently from footage of a soccer match. Follow these guidelines to deliver the best possible Flash video:

Whenever possible, always encode a file from its uncompressed form If you convert a precompressed digital video format into the FLV format, the previous encoder can introduce video noise. The first compressor has already performed its encoding algorithm on the video and has already reduced its quality, frame size, and rate. It may have also introduced some of its own digital artifacts or noise. This additional noise affects the FLV encoding process and may require a higher data rate to play back a good-quality file.

Strive for simplicity Avoid elaborate transitions--they don't compress well and can make your final compressed video look "chunky" during the change. Hard cuts (as opposed to cross-dissolves) are usually best. Video sequences that show an object zooming from behind the first track, doing a "page turn," or wrapping around a ball and then flying off the screen can be eye-catching, but they usually don't compress well and should be used sparingly.

Know your audience data rate When you deliver video over the Internet, you should produce files at lower data rates. Users with fast Internet connections can view the files with little or no wait, but dial-up users must wait for files to download. It is best to make the clips short to keep the download times within acceptable limits for dial-up users.

Select the proper frame rate Frame rate indicates how many frames play each second (fps). If you have a higher data rate clip, a lower frame rate can improve playback on lower-end computers. For example, if you are compressing a talking head clip with little motion, cutting the frame rate in half will probably save you only 20 percent of the data rate. However, if you are compressing high-motion video, reducing the frame rate has a much greater effect on the data rate.

Because video looks much better at native frame rates, Macromedia recommends leaving the frame rate high if your delivery channels and playback platforms allow it. However, if you need to reduce the frame rate, the best results come from dividing the frame rate by whole numbers.

NOTE : If you intend to embed video clips within the SWF file, the frame rate of the video clip must be the same as that used by the SWF. Using the Advanced Video Encoding settings in the Video Import wizard, you can encode video using the same frame rate as the FLA file.

Select a frame size that fits your data rate As with the frame rate, the frame size for your document is important for producing high-quality video. At a given data rate (connection speed), increasing the frame size results in decreased video quality. When you select the frame size for your document, you must consider frame rate, source material, and personal preferences. The following list of common frame sizes (in pixels) can be used as a guideline. You can experiment to find the best setting for your project.

  • Modem: 160 x 120

  • Dual ISDN: 192 x 144

  • T1/DSL/cable: 320 x 240

Know progressive download times You should know how long it is going to take to download your video. While your video clip downloads, you might want to have other content that appears and "disguises" the download. For short clips, you can use the following formula: Pause = download time - play time + 10% of play time. For example, if your clip is 30 seconds long and it takes one minute to download, you should give your clip a 33-second buffer (60 seconds - 30 seconds + 3 seconds = 33 seconds).

Use clean video The higher the quality of the original, the better the final result. Although frame rates and sizes of Internet video are usually smaller than those of television, computer monitors have much better color fidelity, saturation, sharpness, and resolution than conventional televisions. Even with a small window, image quality can be more important for digital video than for standard analog television. Artifacts and noise that would hardly be noticeable on TV can be quite obvious on a computer screen.

Remove noise and interlace After you capture your video content, you might need to remove noise and interlacing.

Follow the same guidelines for audio The same considerations exist for audio production as for video production. To achieve good audio compression, you must begin with clean audio. If you are encoding material from a CD, try to record the file using direct digital transfer instead of through the analog input of your sound card. The sound card introduces an unnecessary digital-to-analog and analog-to-digital conversion that can create noise in your source audio. Direct digital transfer tools are available for Windows and Macintosh platforms. If you must record from an analog source, you should use the highest quality sound card available.

 

Importing video using the Video Import wizard

TOP

The Video Import wizard provides a streamlined interface for importing video into a Flash document. The wizard lets you select whether to import a video clip as a streamed, progressively downloaded, embedded, or linked file. Also, depending on the location of your file, the Video Import wizard provides a series of options for different deployments.

If the video clip you wish to import is located on your local computer, you can browse to it and import the video. You can also import a video stored on a remote web server or Flash Communication Server by providing the URL of the file.

 

Importing video for progressive download (Flash Professional only)

TOP

You can import a video file that is already deployed to a web server, or you can select a video file that is stored locally on your computer, and upload the video file to the server after importing it into your FLA file.

To import video for progressive download:

  1. To import the video clip into the current Flash document, select File > Import > Import video.

    The Import Video wizard is displayed.

  2. Select the video clip you want to import. You can select either a video clip stored on you local computer, or you can enter the URL of a video already uploaded to a web server.

  3. Select Progressive Download from a standard web server.

  4. (Optional) If the video you are deploying is not in FLV format, the Import Video wizard displays the Encoding panel. For information on encoding your video using the Import Video wizard.

  5. Select a skin for your video clip.You can choose to:

    • Not use a skin with the video.

    • Select one of the predefined skins. For more information, see Selecting a predesigned skin in FLVPlayback Component (Flash Professional Only) in the Components Language Reference.

    • Select a custom skin of your own design by entering the URL of the skin on the server.

    The Video Import wizard encodes your source video clip into the FLV format (if it isn't already in FLV format) and creates a video component on the Stage that you can use to test video playback locally.

  6. Upload the following assets to the web server hosting your video:

    • The FLV encoded video clip (which is located in the same folder as the source video clip you selected with a .flv extension).

    NOTE : If the video clip is in FLV format, Flash uses a relative path to point to the FLV file (relative to the SWF), letting you use the same directory structure locally that you use on the server.

    • The video skin (if you chose to use a skin).

    • If you choose to use a predefined skin, Flash copies the skin into the same folder as the FLA file.

    • The video component.

      You must edit the component's URL field to that of the web server to which you are uploading the video using the Component inspector.

Importing video for streaming with Flash Communication Server or FVSS (Flash Professional only)

TOP

You can import a video file that is already deployed to a Flash Communication Server or FVSS, or you can select a video file that is stored locally on your computer, and upload the video file to the server after importing it into your FLA file.

To import video for streaming:

  1. To import the video clip into the current Flash document, select File > Import > Import Video.

    The Import Video wizard is displayed.

  2. Select the video clip you want to import. You can select either a video clip stored on your local computer, or you can enter the URL of a video already uploaded to your own Flash Communication Server or a Flash Video Streaming Service (FVSS).

  3. Select Stream from Flash Video Streaming Service (FVSS) or Stream from Flash Communication Server (FCS).

  4. (Optional) If the video you are deploying is not in FLV format, you can use the Encoding panel to select an encoding profile, and crop, trim and split the video clip.

    NOTE : This step applies only if you are uploading the video from your local computer. Video clips that are already deployed to a server must have previously been encoded in the FLV format.

    When the video you are deploying is not in FLV format, the Import Video wizard displays the Encoding panel.

  5. Select a skin for your video clip. You can choose to:

    • Not use a skin with the video.

    • Select one of the predefined skins.

    • Select a custom skin of your own design by entering the URL of the skin on the server.

    The Video Import wizard encodes your source video clip into the FLV format (if it isn't already in FLV format) and creates a video component on the Stage that you can use to test video playback locally.

  6. Upload the following assets to the FCS or FVSS hosting your video:

    • The FLV encoded video clip (which is located in the same folder as the source video clip you selected with a .flv extension)

    NOTE : If the video you are working with has previously been deployed to your FCS or FVSS hosting your video, you can skip this step.

    • The video skin (if you chose to use a skin)

      If you choose to use a predefined skin, Flash copies the skin into the same folder as the FLA file.

    • The video component

      You must change the FLVPlayback component URL field to specify the web server to which you are uploading the video.

 

Embedding video in a SWF file

TOP

When you import a video clip as an embedded file, you select options in the Video Import wizard for embedding, encoding, and editing the video. Click the Next button to advance through panes in the wizard, and click the Back button to return to previous panes.

You can import video clips as embedded files in several file formats, depending on your system. For information on supported video file formats. You can preview frames of an imported video by dragging the playhead along the Timeline. However, the sound does not play back. To preview the video with sound, use the Test Movie command. For more information.

When you import a video as an embedded file, you have the option to edit the video prior to importing it. You can also apply customized compression settings, including bandwidth or video quality settings. You select editing and encoding options in the Video Import wizard.

NOTE : Once a video clip is imported, it cannot be edited.

To embed video within the SWF file:

  1. To import the video clip into the current Flash document, select File > Import > Import Video.

  2. The Import Video wizard is displayed.

  3. Select the video clip on your local computer that you want to import.

  4. Select the Embed Video in SWF and Play in Timeline check box.

    Choose the symbol type with which to embed the video within the SWF.

    You can choose to embed the video as embedded video, a movie clip, or graphic symbol. The method you choose depends on how you intend to integrate the video into the SWF and interact with it:

    Embed in the Timeline The most common choice is to integrate the video clip as an embedded video within the Timeline. If you're using the video clip for linear playback in the Timeline, importing the video into the Timeline is the most appropriate method.

    Embed as a movie clip When you work with embedded video, a best practice is to place video inside a movie clip instance, because you have the most control over the content. The video's Timeline plays independently from the main Timeline. You do not have to extend your main Timeline by many frames to accommodate the video, which can make working with your FLA file difficult.

    Embed as a graphic symbol Embedding a video clip as a graphic symbol means that you cannot interact with the video using ActionScript (typically you use graphic symbols for static images and to create reusable pieces of animation that are tied to the main Timeline). For this reason, you'll rarely want to embed a video as a graphic symbol.

  5. Import the video clip directly onto the Stage (and the Timeline) or as a library item.

    By default, Flash places the video you import on the Stage. If you prefer that the video be imported only into the library, deselect the Place Instance on Stage check box.

    If you're creating a simple video presentation with linear narration and little to no interaction, accept the default setting and import the video to the Stage. If, however, you want to create a more dynamic presentation, are working with multiple video clips, or intend to add dynamic transitions or other elements using ActionScript, import the video into the library. Once a video clip is in the library, you can customize it by converting it into a MovieClip object that can be more easily controlled using ActionScript.

    By default, Flash expands the Timeline to accommodate the playback length of the video clip you are embedding.

  6. (Optional) If you want to edit the video clip using the Video Import wizard, select the Edit Video First check box.

    The Video Import wizard includes basic video editing options that let you crop and trim video clips. If you want to edit your video clip prior to embedding it in the Timeline, select this option.

  7. (Optional) If the video clip is not yet encoded in the FLV format, select a Flash Video encoding profile.

  8. Click Finish to close the Video Import wizard and complete the video import procedure.

    The Video Import wizard encodes your video into the FLV format, and embeds the video into the SWF file. The video is displayed either on the Stage or in the library depending on the embedding options you chose.

  9. In the Property inspector (Window > Properties), give the video clip an instance name, and make any modifications to the video clip's properties that you might need.

To update an embedded video clip after editing it in an external editor:

  1. Select the video clip in the Library panel.

  2. In the options menu in the upper right corner of the Library panel, select Properties.

  3. Click Update in the Embedded Video Properties dialog box.

    The embedded video clip is updated with the edited file. The compression settings you selected when you first imported the video are reapplied to the updated clip.

 

Importing linked QuickTime video files

TOP

If you are importing a QuickTime video clip, you can link to the video from the Flash file, rather than embed the video. A linked QuickTime video imported into Flash does not become part of the Flash file. Instead, Flash maintains a pointer to the source file.

If you link to a QuickTime video, you must publish the SWF file as a QuickTime video. You cannot display a linked QuickTime clip in SWF format. The QuickTime file contains a Flash track, but the linked video clip remains in QuickTime format.

For more information on publishing your Flash file as a QuickTime video.

You can scale, rotate, and animate a linked QuickTime video in Flash. However, you cannot tween linked QuickTime video content in Flash.

NOTE : The QuickTime Player does not support Flash Player files greater than version 5.

To import a QuickTime video as a linked file:

  1. Do one of the following:

    • To link the video clip directly to the current Flash document, select File > Import > Import to Stage.

    • To link the video clip to the library for the current Flash document, select File > Import > Import to Library.

  2. In the Import Video wizard, select Link to External Video File, and click Next.

  3. If you imported the video clip directly to the Stage in step 1, a warning appears if the imported clip contains more frames than the span in which you are placing it in the current Flash document. Do one of the following:

    • Click Yes to extend the span the required number of frames.

    • Click No to keep the span at its current size. Frames in the imported clip that exceed the frames in the span do not appear unless you subsequently add frames to the span.

    You can preview a linked QuickTime video before you publish your SWF file. When you import a linked QuickTime video, Flash adds the required number of frames to preview the QuickTime video, the same as it does for an embedded video.

NOTE : You cannot preview linked QuickTime video content using the Test Movie command.

To preview a linked QuickTime video:

  • Select Control > Play.

 

Changing the directory path of a linked QuickTime video

TOP

You can set the directory path of a linked QuickTime video clip in the library for the current Flash document.

To set the directory path of a linked QuickTime video clip:

  1. Select Window > Library, and select the desired linked QuickTime video.

  2. In the options menu in the upper right corner of the Library panel, select Properties.

  3. Click Set Path in the Linked Video Properties dialog box.

  4. In the Open dialog box, navigate to the file for the linked video clip and select it, and then click Open.

  5. In the Linked Video Properties dialog box, click OK.

 

Editing video clips in the Video Import wizard

TOP

The Video Import wizard provides editing options that let you edit video as you import it. You can select in and out points for a clip, create multiple clips from one imported clip, and select other editing options. Editing as you import video clips is especially useful with raw footage.

To edit a video clip:

  1. Import the video clip.

  2. Select Edit the Video First, and click Next to open the Editing pane of the Video Import wizard.

  3. To browse frames in the video, do one of the following:

    • Drag the playhead along the scrubber bar.

    • Click the Play button to move forward, and click the Pause button to stop at the desired frame.

    • Click the Backward and Forward buttons in the Controller to move forward or backward one frame at a time.

  4. To set the in and out points (beginning and ending frames), do one of the following:

    • Drag the in and out points (the triangles below the scrubber bar).

    • Click the In or Out button in the button controls below the scrubber bar to set the beginning or ending frame at the current location of the playhead.

  5. To play the video, do one of the following:

    • Click the Play button in the button controls to play the video from the current playhead position.

    • Click Preview to play the video with the current in and out points.

    NOTE : Click the Stop button in the button controls to stop video playback.

  6. To create a clip with the current in and out points, click Create Clip.

    The clip appears in the scroll pane at the left of the Editing pane.

    To create additional clips from the same file, select in and out points for the clips as described in step 4, and click Create Clip again.

  7. To rename a clip, select it in the scroll pane and enter the new name.

  8. To re-edit a clip, select it in the scroll pane. Select new in and out points as described in step 4, and click Update Clip.

  9. To delete a clip from the scroll pane, select the clip and click the Delete (-) button.

  10. When you have completed the editing process, click Next to advance to the next pane in the Video Import wizard.

 

Selecting a video encoding profile

TOP

Flash provides several preconfigured encoding profiles that you can use to encode your video. In the Encoding panel, you can select an encoding profile to determine the level of compression to be applied to the video clip.

The encoding profiles are based on the Flash Player version you intend to publish content for, and the data rate at which you want your video content to be encoded. If you choose an encoding profile using Flash Player 8, the On2 VP6 video codec is used to encode the video. If choose an encoding profile using Flash Player 7, the Sorenson Spark video codec is used to encode the video. For more information on supported video codecs and Flash Player compatibility.

To select a video encoding profile:

  1. In the Encoding panel, select an encoding profile from the Flash Video encoding profile pop-up menu.

  2. Verify that the encoding profile you've selected is appropriate for your intended application.

    The text box below the Flash Video encoding profile pop-up menu displays the Flash Player version, video codec, video bitrate, and audio encoding information for the selected encoding profile.

  3. Do one of the following:

    • Click Show Advanced Settings to further adjust the encoding settings, or to modify the video clip's size or playback length using the crop-and-trim controls.

    • Click Continue to encode the video.
       

Specifying advanced encoding settings (Flash Professional only)

TOP

The Video Import wizard and the FLV QuickTime Export plug-in let you create your own video encoding settings to fine-tune the quality and download size of video clips.

To specify advanced video encoding settings:

  1. The Encode Video check box should be selected by default. If it is not, select it to activate the advanced encoding options.

  2. Select a video codec with which to encode your content from the Video codec pop-up menu.

    If you are authoring for Flash Player 6 or 7, choose the Sorenson Spark codec; if you are authoring for Flash Player 8, choose the On2 VP6 codec.

  3. Select a frame rate.

    By default, Flash Video Encoder uses the same frame rate as the source video. Macromedia recommends using the default frame rate unless you are very experienced with video encoding, and have a specific application that requires modifying the source video's frame rate. If you need to alter the frame rate, be sure you understand how modifying the frame rate affects the video quality.

    NOTE : If you intend to embed video clips within the SWF file, the frame rate of the video clip must be the same as that used by the SWF. Using the Advanced Video Encoding settings in the Video Import wizard, you can encode video using the same frame rate as the FLA file.

  4. Select the keyframe placement for the video.

    Keyframes are video frames that contain complete data. For example, if you specify a keyframe interval of 30, Flash Video Encoder encodes a complete frame every 30 frames in the video clip. For frames between keyframe intervals, Flash stores only the data that changes from the preceding frame.

    By default, Flash Video Encoder places a keyframe every two seconds of playback time. For example, if the video you're encoding has a frame rate of 30 fps, a keyframe will be inserted every 60 frames. In general, the default keyframe value provides a reasonable level of control when seeking within a video clip. If you need to select a custom keyframe placement value, be aware that the smaller the keyframe interval, the larger the file size.

  5. Specify the quality of the video from the Quality pop-up menu.

    The quality setting determines the data rate (or bit rate) of the encoded video. The higher the data rate, the better the quality of the encoded video clip. To specify a quality setting, do one of the following:

    • Select a preset quality setting (Low, Medium, or High) to automatically select a Data Rate value. When you select Low, Medium, and High from this menu, the Maximum Data Rate text box updates to reflect the specified value.

    • Select Custom and enter a value, in Kilobits/Sec, in the Maximum Data Rate text box.

      NOTE : If you find that the preset quality settings are not working with your particular source footage, try specifying a custom maximum data rate. For more information on data rate and how it affects video quality.

  6. To resize the video clip, do the following:

    • Select the Resize video check box.

    • (Optional) Select the Maintain Aspect Ratio check box to keep the aspect ratio the same as the original video clip.

      NOTE : If you resize a video clip's frame size, and do not select the Maintain Aspect Ratio check box, the video may become distorted.

    • Specify values for Width and Height. You can specify a frame size in pixels or as a percentage of the original image size.

  7. If you are done specifying advanced encoding settings, click Next to move to the next panel of the Video Import wizard, or select either the Cue Point or the Crop and Trim tab to further modify the video's encoding settings.

 

Specifying advanced audio encoding settings

TOP

The audio encoding settings portion of the dialog box is automatically selected when an audio-only file is added to the encoding list (this portion of the dialog box is disabled when encoding video content without a combined audio track).

NOTE : You can select an encoding profile from the Flash Video encoding profile pop-up menu, which will set a corresponding profile for the audio-only encoding format.

To specify custom audio encoding settings:

  1. If the Encode Audio check box is not selected, select it to activate the advanced audio encoding options.

    The Encode Audio check box should be selected by default. The default audio codec is MP3.

    NOTE : If the source video file has no audio track, or if you are encoding MPEG-1 files on a Macintosh, the audio encoding settings portion of the dialog box is disabled.

  2. Select a data rate from the Data rate pop-up menu.

    The data rate is the bit rate of the MP3 audio stream. Better quality audio tracks, such as music and significant background noise, require a higher bit rate. Simple dialogue, such as with a "talking head" shot, can be compressed to a much higher degree. Higher bit rate settings (encoded at 80 Kbps or higher) are encoded in stereo, while lower bit rate settings (encoded at 64 Kbps or lower) are encoded in mono.

  3. Click Next to move to the next panel of the Video Import wizard, or select another of the Advanced Settings tabs to further modify the video clip.

 

Embedding cue points (Flash Professional only)

TOP

Cue points cause the video playback to trigger other actions within the presentation. For example, you can create a Flash presentation that has video playing in one area of the screen while text and graphics appear in another area. A cue point placed in the video triggers an update to the text and graphic, letting them remain relevant to the content of the video.

Each cue point consists of a name and the time at which it occurs. You specify cue point times in hour:minute:second:milisecond format; the default frame rate is 30 frames per second (fps). You can specify cue point times with any frame rate, and also express them in milliseconds rather than frame numbers.

To define and embed cue points, you must either use Flash Video Encoder or import a video clip using the Video Import wizard. For information on importing video using the Video Import wizard, see Importing video using the Video Import wizard.

To define and embed cue points in a video clip:

  1. From the Encoding panel of the Video Import wizard, click Show Advanced Settings.

  2. Select a predefined encoding profile from the Flash Video encoding profile pop-up menu, or create your own custom encoding profile using the encoding options in the Encoding tab.

  3. Click the Cue Points tab.

    The Cue Points settings are displayed.

  4. Use the playback head to locate a specific frame (point in the video) where you want to embed a cue point. For greater precision, select the playback head, and use the left and right arrow keys to locate specific points within the video.

    To locate a specific frame, use the pointer to move the playback head to the point in the video where you want to embed a cue point. The video preview window lets you visually identify points in the video at which to insert a cue point. You can also use the elapsed time counter (located beneath the video preview window) to locate specific points in time at which to embed cue points.

  5. When the playback head is positioned on a frame where you want to embed a cue point, click the Add Cue Point button.

    Flash Video Encoder embeds a cue point on that frame of the video, and populates the cue point list with a placeholder for the name of the new cue point, and the elapsed time and video frame at which the cue point is located (this is the time during playback when the event will be triggered). Flash Video Encoder also displays a pop-up menu that lets you select the type of cue point to embed.

    A cue point marker is displayed on the slider control at the point where the cue point was embedded. You can use the cue point marker to adjust the placement of the cue point.

  6. Specify the type of cue point you want to embed, an event cue point or a navigation cue point:

    • Event cue points are used to trigger ActionScript methods when the cue point is reached, and let you synchronize the video playback to other events within the Flash presentation.

    • Navigation cue points are used for navigation and seeking, and to trigger ActionScript methods when the cue point is reached. Embedding a navigation cue point inserts a keyframe at that point in the video clip.

  7. Enter parameters for the selected cue point.

Parameters are a set of key-value pairs that you can add to the cue point. The parameters are passed to the cue point event handler as members of the single parameter object.

 

Cropping and trimming video

TOP

Flash Video Encoder provides the following editing options that let you crop and trim video clips before encoding them:

Cropping lets you alter the dimensions of a video clip. You can eliminate areas of the video to emphasize a particular focal point within the frame such as highlighting a character by removing ancillary imagery or removing unwanted backdrops.

Trimming lets you edit the beginning and ending points (the in and out points) of a video. For example, you can adjust the trim of a video clip to begin playback 30 seconds into the full clip, removing unwanted frames.

  1. From the Encoding panel of the Video Import wizard, click Show Advanced Settings.

    The Advanced Flash Video Encoding Options are displayed.

  2. If you haven't yet specified an encoding setting for the video clip, do so now.

  3. Click the Crop and Trim tab.

    The Crop and Trim tab is displayed.

  4. Enter values for the right, left, top, and bottom edges to crop the video, or use the slider controls to visually adjust the dimensions of the video.

    Guides in the preview window indicate the cropped area.

  5. To set the in and out points, drag the in and out point markers below the scrubber bar until you finish adjusting the video clip size. For greater precision, select the in and out point markers, and use the left and right arrow keys to locate specific points within the video.

    The video preview window lets you visually identify beginning and ending frames where you can trim the video clip. You can also use the elapsed time counter (located in the Trim section of the dialog box) to locate specific points in time where you can trim the video clip.

  6. Preview the video by dragging the play head over the scrubber bar to ensure that the video plays appropriately.

  7. When you finish cropping and trimming the video, select either the Cue Point or the Encoding tab to further modify the video's encoding settings, or click OK to return to the main Flash 8 Video Encoding dialog box.

    At this point, you may be ready to encode your video clips or you may want to add additional source video clips to encode. For more information, see Encoding video.

 

Importing Flash Video files into the Library

TOP

You can import files in the FLV format using the Import or Import to Library commands or the Import button in the Embedded Video Properties dialog box.

If you intend to create your own video player, which will dynamically load FLV files from an external source, you should place your video inside of a movie clip symbol. This way, when you load FLV files dynamically, you can adjust the dimensions of the movie clip to match the actual dimension of the FLV. You can also scale the video by scaling the movie clip.

NOTE : When you work with embedded video, a best practice is to place video inside a movie clip instance, because you have the most control over the content. The video's Timeline plays independently from the main Timeline. You do not have to extend your main Timeline by many frames to accommodate the video, which can make working with your FLA file difficult.

To import an FLV file into the Library, do one of the following:

  • Select File > Import > Import to Library.

  • Select any existing video clip in the Library panel, and select Properties from the Library options menu. In the Embedded Video Properties dialog box, click Import. Locate the file you want to import, and click Open in the Open dialog box.

 

About playing back external FLV files dynamically

TOP

As an alternative to importing video into the Flash authoring environment, you can use either the FLVPlayback component or ActionScript to dynamically play external FLV files in Flash Player. You can play FLV files posted as HTTP downloads or as local media files.

You can create FLV files by importing video into the Flash authoring tool and exporting it as an FLV file. If you have Macromedia Flash Professional 8, you can use the FLV Export plug-in to export FLV files from supported video-editing applications.

To play back an external FLV file, you must post an FLV file to a URL (either an HTTP site or a local folder) and add either the FLVPlayback component or ActionScript code to the Flash document to access the file and control playback during runtime.

Using external FLV files provides certain capabilities that are not available when using imported video, as described in the following list:

  • You can use longer video clips in your Flash documents without slowing down playback. External FLV files are played using cached memory, which means that large files are stored in small pieces and accessed dynamically; they do not require as much memory as embedded video files.
  • An external FLV file can have a different frame rate from the Flash document in which it plays. For example, you can set the Flash document frame rate to 30 fps and the video frame rate to 21 fps, which gives you greater control in ensuring smooth video playback.
  • With external FLV files, Flash document playback does not have to be interrupted while the video file is loading. Imported video files can sometimes interrupt document playback to perform certain functions (for example, to access a CD-ROM drive). FLV files can perform functions independently of the Flash document, and so do not interrupt playback.
  • Captioning video content is easier with external FLV files because you can use callback functions to access metadata for the video.

 

Changing the properties of a video clip

TOP

You can use the Property inspector to change properties for an instance of an embedded or linked video clip on the Stage. In the Property inspector, you can assign the instance an instance name and change its width, height, and position on the Stage. You can also swap an instance of a video clip--assign a different symbol to an instance of a video clip. Assigning a different symbol to an instance displays a different instance on the Stage but leaves all the other instance properties (such as dimensions and registration point) intact.
The Embedded Video Properties dialog box lets you view information about an imported video clip, including its name, path, creation date, pixel dimensions, length, and file size. You can change the video clip name, update the video clip if you modify it in an external editor, and import an FLV video to replace the selected clip.

NOTE : You can also export a video clip as an FLV file using the Embedded Video Properties dialog box.

To change video instance properties in the Property inspector:

  1. Select an instance of an embedded or linked video clip on the Stage.

  2. Select Window > Properties > Properties.

  3. In the Property inspector, do any of the following:

    • Enter an instance name in the Name text box on the left side of the Property inspector.

    • Enter values for W and H to change the dimensions of the video instance.

    • Enter values for X and Y to change the position of the upper left corner of the instance on the Stage.

    • Click Swap. In the Swap Embedded Video dialog box, select a video clip to replace the one currently assigned to the instance.

    NOTE : You can swap an embedded video clip only with another embedded video clip, and you can swap a linked video clip only with another linked video clip.

To view video clip properties in the Embedded Video Properties dialog box:

  1. Select a video clip in the Library panel.

  2. Select Properties from the Library options menu.

To assign a new name to a video clip:

  1. Select the video clip in the Library panel.

  2. Select Properties from the Library options menu.

  3. In the Embedded Video Properties dialog box, enter a new name in the Name text box.

To update a video clip:

  1. Select the video clip in the Library panel.

  2. Select Properties from the Library options menu.

  3. In the Embedded Video Properties dialog box, click Update.

  4. Navigate to the updated video file and click Open.

    The file is reimported into the Flash document.

To replace a video clip with an FLV clip:

  1. Select the video clip in the Library panel.

  2. Select Properties from the Library options menu.

  3. In the Embedded Video Properties dialog box, click Import.

  4. Navigate to the FLV file that will replace the current clip, and click Open.

 

Controlling video playback using behaviors

TOP

Video behaviors provide one way to control video playback. Behaviors are prewritten ActionScript scripts that you add to a triggering object to control another object. Behaviors let you add the power, control, and flexibility of ActionScript coding to your document without having to create the ActionScript code. Video behaviors let you play, stop, pause, rewind, fast-forward, show, and hide a video clip.

To control a video clip with a behavior, you use the Behaviors panel to apply the behavior to a triggering object, such as a movie clip. You specify the event that will trigger the behavior (such as releasing the movie clip), select a target object (the video that is affected by the behavior), and when necessary, select settings for the behavior, such as the number of frames to rewind.

NOTE : The triggering object must be a movie clip. It is not possible to attach video playback behaviors to button symbols or button components.

The following behaviors come with Flash Basic 8 and Flash Professional 8, and are used to control embedded video:

Behavior

Purpose

Parameters

Play Video

Plays a video in the current document.

Instance name of target video

Stop Video

Stops the video.

Instance name of target video

Pause Video

Pauses the video.

Instance name of target video

Rewind Video

Rewinds the video by the specified number of frames.

Instance name of target video

Number of frames

Fast Forward Video

Fast-forwards the video by the specified number of frames.

Instance name of target video

Number of frames

Hide Video

Hides the video.

Instance name of target video

Show Video

Shows the video.

Instance name of target video

To add and configure a behavior:

  1. Select the movie clip that will trigger the behavior.

  2. In the Behaviors panel (Window > Behaviors), click the Add (+) button, and select the desired behavior from the Embedded Video submenu.

  3. In the dialog box that appears, select the video you want to control with the behavior.

  4. Select a Relative or Absolute path.

  5. If required, select settings for the behavior parameters and click OK.

    Default event and actions for the behavior appear in the Behaviors panel.

  6. In the Behaviors panel under Event, click On Release (the default event) and select a mouse event from the menu. If you want to use the On Release event, leave the option unchanged.

 

Using the FLVPlayback component (Flash Professional only)

TOP

With Flash Professional 8 media components, you can quickly and easily add Flash video and playback controls to your documents. Then, using cue points, you can synchronize your video with animation, text, and graphics. For example, you can create a Flash presentation that has video playing in one area of the screen while text and graphics appear in another area. A cue point placed in the video triggers an update to the text and graphic, letting them remain relevant to the content of the video.

New to Flash Professional 8 is FLVPlayback, a component designed to let you implement video quickly and successfully, while providing a richer feature set than the components available in previous versions of Flash. Using the FLVPlayback component, you can play video delivered by progressive streaming video over HTTP from a Flash Video Streaming Service (FVSS) or from Flash Communication Server (FCS).

The FLVPlayback component does the following:

  • Provides a set of prefabricated skins with which to customize playback controls and the look and feel of the user interface

  • Lets advanced users create their own custom skins

  • Provides cue points that you can use to synchronize your video with the animation, text, and graphics within your Flash application

  • Provides live preview of customizations

  • Maintains a reasonably sized SWF file for easy download

The FLVPlayback component is the display area in which you view video. The FLVPlayback component includes the FLV Custom UI controls, a set of control buttons that let you play, stop, pause, and control playback the video. These controls include the BackButton, ForwardButton, PauseButton, PlayButton, PlayPauseButton, SeekBar, and StopButton, which you can drag to the Stage and customize individually.

The following sections provide basic instructions on configuring the FLVPlayback component after you import a video into Flash using the Video Import wizard. To learn more advanced procedures for working with the FLVPlayback component.

To configure the FLVPlayback component:

  1. With the component selected, open the Property inspector (Windows > Properties) and enter an instance name.

  2. Select the Parameters tab in the Property inspector or open the Component inspector (Windows > Components).

  3. Enter values for parameters or use default settings.

For each FLVPlayback component instance you can set the following parameters in the Property inspector or in the Component inspector:

NOTE : In most instances, it is not necessary to alter the settings in the FLVPlayback component unless you want to change the appearance of a video skin. The Video Import wizard sufficiently configures the parameters for most deployments.

autoPlay Boolean value that determines how to play the FLV. If true, the FLV plays immediately when it is loaded. If false, loads the first frame and pauses. The default value is true.

autoRewind Boolean value that determines whether the FLV is automatically rewound. If true, the Video component automatically rewinds the FLV to the beginning when the playhead reaches the end or when the user clicks the stop button. If false, the Video component does not automatically rewind the FLV. The default value is true.

autoSize Boolean value that, if true, resizes the component at runtime to use the source FLV dimensions. The default value is false.

NOTE : The encoded frame size of the FLV is not the same as the default dimensions of the FLVPlayback component.

bufferTime The number of seconds to buffer before beginning playback. The default value is 0.

contentPath A string that specifies the URL to an FLV or to an XML file that describes how to play the FLV. Double-click the Value cell for this parameter to activate the Content Path dialog box. The default is an empty string. If you do not specify a value for the contentPath parameter, nothing happens when Flash executes the FLVPlayback instance.

isLive A Boolean value that, if true, specifies that the FLV is streaming live from FCS. The default value is false.

cuePoints A string that specifies the cue points for the FLV. Cue points allow you to synchronize specific points in the FLV with Flash animation, graphics, or text. The default value is an empty string.

maintainAspectRatio A Boolean value that, if true, resizes the video player within the FLVPlayback component to retain the source FLV aspect ratio; the source FLV will still be scaled and the FLVPlayback component itself will not be resized. The autoSize parameter takes precedence over this parameter. The default value is true.

skin A parameter that opens the Select Skin dialog box and allows you to choose a skin for the component. The default value is None. If you choose None, the FLVPlayback instance does not have control elements that allow the user to play, stop, or rewind the FLV, or take other actions that the controls make possible. If the autoPlay parameter is set to true, the FLV plays automatically. For more information.

totalTime The total number of seconds in the source FLV. The default value is 0. If you use progressive download, Flash uses this number if it is set to a value greater than zero. Otherwise, Flash tries to take the time from metadata.

NOTE : If you're using FCS or FVSS, this value is ignored; the total time of the FLV is taken from the server.

volume A number from 0 to 100 that represents the percentage of maximum volume at which to set the volume.
 

Specifying the contentPath parameter

TOP

If you imported a local video clip into Flash for use with progressively downloaded or streaming video content, you must update the contentPath parameter of the FLVPlayback component prior to uploading your content to a web server. The contentPath parameter lets you specify the name and location of the FLV on the server, as well as implying the playback method (for example, progressively download using HTTP, or streaming from Flash Communication Server using RTMP).

To specify the name and location of the FLV:

  1. With the component selected, open the Property inspector (Window > Properties) and select the Parameters tab in the Property inspector, or open the Component inspector (Window >Component Inspector).

  2. Enter values for parameters, or use the default settings as appropriate. For the contentPath parameter, do the following:

    1. Double-click the Value cell for the contentPath parameter to activate the Content Path dialog box.

    2. Enter the URL or local path to either the FLV file or the XML file (for Flash Communication Server or FVSS) that describes how to play the FLV.

      If you do not know the location of the FLV or XML file, click the folder icon to activate a File browser dialog box that lets you navigate to the correct location. When browsing for an FLV file, if it is at or below the location of the target SWF file, Flash automatically makes the path relative to that location so that it is ready for serving from a web server. Otherwise, it is an absolute Windows or Macintosh file path.

      If you specify an HTTP URL, the FLV is a progressive download FLV. If you specify a URL that is a Real-Time Messaging Protocol (RTMP) URL, the FLV streams from a Flash Communication Server (FCS). A URL to an XML file could also be a streaming FLV from FCS or from a Flash Video Streaming Service (FVSS).

      NOTE : When you click OK on the Content Path dialog box, Flash updates the value of the cuePoints parameter, too, because you might have changed the contentPath parameter so that the cuePoints parameter no longer applies to the current content path. As a result, you will lose any disabled cue points, although not ActionScript cue points. For this reason, you might want to disable non-ActionScript cue points through ActionScript, rather than through the Cue Points dialog box.

      You can also specify the location of an XML file that describes how to play multiple FLV streams for multiple bandwidths. The XML file uses the Synchronized Multimedia Integration Language (SMIL) to describe the FLVs. For a description of the XML SMIL file.

 

About controlling video playback using the Timeline

TOP

You can control playback of an embedded or linked video file by controlling the Timeline that contains the video. For example, to pause a video playing on the main Timeline, you would call a stop() action that targets that Timeline. Similarly, you can control a video object in a movie clip symbol by controlling the playback of that symbol's Timeline.

You can apply the following actions to imported video objects in movie clips: goTo, play, stop, toggleHighQuality, stopAllSounds, getURL, FScommand, loadMovie, unloadMovie, ifFrameLoaded, and onMouseEvent. To apply actions to a Video object, you must first convert the Video object to a movie clip.

You can also use ActionScript to show a live video stream from a camera. First, use the New Video Object in the Library panel to place a Video object on the Stage. Then use Video.attachVideo to attach the video stream to the Video object.

 

Media components (Flash Player 6 and 7)

TOP

NOTE : The media components were introduced in Flash MX Professional 2004. If you are developing content for use with Flash Player 8, you should instead use the FLVPlayback component introduced in Flash Professional 8. The FLVPlayback component provides improved functionality, giving you more control over video and audio playback within the Flash environment. To learn more about the FLVPlayback component, see Using the FLVPlayback component (Flash Professional only).

The media component suite consists of three components: MediaDisplay, MediaController, and MediaPlayback. With the MediaDisplay component, adding media to your Flash documents is as simple as dragging the component to the Stage and configuring it in the Component inspector. In addition to setting the parameters in the Component inspector, you can add cue points to trigger other actions. The MediaDisplay component has no visual representation during playback; only the video clip is visible.

The MediaController component provides user interface controls that let the user interact with streaming media. The Controller features Play, Pause, and Rewind to Start buttons and a volume control. It also includes playbars that show how much of the media has loaded and how much has played. A playhead slider can be dragged forward and backward on the playbar to navigate quickly to different parts of the video. Using behaviors or ActionScript, you can easily link this component to the MediaDisplay component to show streaming video and provide user control.

The MediaPlayback component provides the easiest and quickest way to add video and a controller to your Flash documents. The MediaPlayback component combines the MediaDisplay and MediaController components into a single, integrated component. The MediaDisplay and MediaController component instances are automatically linked to each other for playback control.

You use the Component inspector or the Parameters tab in the Property inspector to configure parameters for playback, size, and layout for all three components. All the media components work equally well with MP3 audio content.

 

Copyright ADOBE - All Rights Reserved Worldwide

 

 

More Topics:

Working with Flash Documents

How to work in Flash WorkSpace

Working with Projects in Flash

Process to Build your First Application in Flash

Using Symbols, Instances and Library Assets in Flash

How to Build Video Player in Flash

How to Work with Color, Strokes and Fills in Flash

How to Create Document in Flash

What is Vector and Bitmap Graphics in Flash

How to Create a Banner in Flash, Part 1

How to Work with Text in Flash

How to Create a Banner in Flash, Part 2

How to Use Imported Artwork in Flash

How to Create a Banner in Flash, Part 3

How to Work with Graphic Objects in Flash

How to Work with Layers in Flash

How to Use Filters and Blends

Working with Graphics in Flash

What is Accessibility Features in Flash

How to Create Motion (Shape Tween & Motion Tween) in Flash

How to Create an Application in Flash

What is Masking in Flash

How to Work with Video in Flash

How to Use Layout Tools in Flash

What are Behaviors in Flash

How to Work with Sound in Flash

How to Create Symbols and Instances in Flash

What is ActionScript in Flash

How to Write ActionScript With Script Assist in Flash

How to Add Button Animation and Navigation in Flash

What is Data Integration in Flash

How to Work with Screens

How to Create a Presentation with Screens

What is Extending Flash

How to Create Multilanguage Text in Flash

How to Create Graphics: Draw in Flash

What is Flash Lite

Ways of Data Integration

How to Create Graphics: Create a Timeline Animation in Flash

Getting Started with Flash Lite in Flash

How to Publish Flash Documents

How to Create Graphics: Making Animations with Easing

Learning Flash Lite 1.X ActionScript in Flash

How to Export Flash Content and Images from Flash

How to Create Graphics: Applying Gradients in Flash

Process of Writing and Editing ActionScript 2.0 in Flash

How to Create Accessible Content in Flash

How to Create Graphics: Apply Graphic Filters and Blends

What is Data and Data Types in Flash

Process of Printing from SWF Files in Flash

Using ActionScript: How to Use Script Assist mode in Flash

Learn Syntax and Language Fundamentals in Flash

How to Create E-learning Content in Flash

Using ActionScript: How to Write Scripts in Flash

Working with Functions and Methods in Flash

Process of Using Templates in Flash

Using ActionScript: Process of Adding Interactivity in Flash

What are Classes in Flash

Control Tag Summary of XML to UI in Flash

Using ActionScript: How to Create a Form with Conditional Logic and Send Data in Flash

What is Inheritance in Flash

What is Data Integration: Overview

Using ActionScript: How to Work with Objects and Classes in Flash

Overview on Interfaces in Flash

What is Data Integration: Using XML for a Timesheet

How to Work with Text and Strings in Flash

How to use Handling Events in Flash

What is Data Integration: Using XUpdate to Update the Timesheet

Learning Animation, Filters and Drawings in Flash

How to Work with Movie Clips in Flash

How to Create Interaction with ActionScript in Flash

How to Work with Images, Sound, and Video in Flash

How to Work with External Data in Flash

What is Security in Flash

How to Debug Applications in Flash

List of Error Messages in Flash

Using Object-Oriented Programming with ActionScript 1.0 in Flash

How to Write Scripts for Earlier Versions of Flash Player in Flash

List of all Keyboard Keys and Key Code Values for using in Flash

Terminology

Introduction to Components in Flash

What are Components in Flash

How to Create an Application with Components

How to Work with Components in Flash

How to Handle Component Events in Flash

How to Customize Components in Flash

How to Create Components in Flash

What is Collection Properties in Flash