
300
USING FLASH CS4 PROFESSIONAL
Video
b
Enter the URL or local path to the FLV or F4V file, or the XML file (for Flash Media Server or FVSS) that describes
how to play the video.
If you do not know the location of the video or XML file, click the folder icon to navigate to the correct location. When
browsing for an video 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 video file is a progressive download FLV or F4V file. If you specify a URL that is a
Real-Time Messaging Protocol (RTMP) URL, the video streams from a Flash Media Server (FMS). A URL to an XML
file could also be a streaming video file from FMS or from a 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 lose any disabled cue points, although not ActionScript cue points. For this reason,
you may want to disable non-ActionScript cue points through ActionScript, rather than through the Cue Points dialog box.
When you specify the
contentPath
or
source
parameter, Flash attempts to verify that the video you specified is
compatible with Flash Player. If you see a warning dialog box, try re-encoding the video to FLV or F4V format with
Adobe Media Encoder.
You can also specify the location of an XML file that describes how to play multiple video streams for multiple
bandwidths. The XML file uses Synchronized Multimedia Integration Language (SMIL) to describe the video files. For
a description of the XML SMIL file, see “Using a SMIL file” in the
ActionScript 2.0 Components Language Reference
.
Media components (Flash Player 6 and
7)
Note:
The media components were introduced in Macromedia Flash MX Professional 2004 and are intended for use with
Flash Player 6 or 7. If you are developing video content to use with Flash Player 8, instead use the FLVPlayback
component introduced in Macromedia Flash Professional 8. The FLVPlayback component provides improved
functionality, giving you more control over video playback in the Flash environment.
The media component suite consists of three components: MediaDisplay, MediaController, and MediaPlayback. With
the MediaDisplay component, to add media to your Flash documents, drag the component to the Stage and configure
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.
To configure parameters for playback, size, and layout for all three components, use the Component inspector or the
Parameters tab in the Property inspector. All the media components work equally well with mp3 audio content.
For more information on the media components, “Media components,” in the
ActionScript 2.0 Components Language
Reference
.
Updated 5 March 2009