
297
USING FLASH CS4 PROFESSIONAL
Video
•
An external FLV or F4V 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 or F4V 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 or F4V files can perform functions independently of the Flash
document, and so do not interrupt playback.
•
Captioning video content is easier with external FLV or F4V files because you can use callback functions to access
metadata for the video.
For more information on playing back FLV or F4V files, see “Playing back external FLV files dynamically” in
Learning
ActionScript 2.0 in Adobe Flash
or Basics of video in
Programming ActionScript 3.0
.
The Creative Cow web site provides an excellent tutorial on
creating a video player with ActionScript 2.0
and another
on
creating a video player with ActionScript 3.0
.
See also
“
Stream video using Flash Media Server
” on page 288
“
Progressively download video using a web server
” on page 289
Behaviors used in video playback
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 add the power, control, and flexibility of ActionScript coding
to your document without having to create the ActionScript code. Video behaviors play, stop, pause, rewind, fast-
forward, show, and hide a video clip.
To control a video clip with a behavior, use the Behaviors panel to apply the behavior to a triggering object, such as a
movie clip. Specify the event that triggers 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. You cannot attach video playback behaviors to button symbols or button
components.
The following behaviors in Flash 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
Updated 5 March 2009