User Guide
FLVPlayback class 569
Example
The following example attaches individual FLV Playback Custom UI controls to an
FLVPlayback component by setting the following properties:
playPauseButton,
stopButton, backButton, forwardButton, and bufferingBar. The buffering bar appears
only while the FLV file is buffering before it begins to play.
Drag an FLVPlayback component to the Stage, give it an instance name of my_FLVPlybk,
and set the
skin parameter to None in the Component inspector. Next, add the following
individual FLV Playback Custom UI components and give them the instance names shown in
parentheses: PlayPauseButton (my_bkbttn), StopButton (my_stopbttn), BackButton
(my_bkbttn), ForwardButton (my_fwdbttn), and BufferingBar (my_buffrgbar). Then add
the following lines of code to the Actions panel on Frame 1 of the Timeline:
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
- FLV Playback Custom UI PlayPauseButton, StopButton, BackButton,
ForwardButton, BufferingBar components in the Library
*/
import mx.video.*;
my_FLVPlybk.playPauseButton = my_plypausbttn;
my_FLVPlybk.stopButton = my_stopbttn;
my_FLVPlybk.backButton = my_bkbttn;
my_FLVPlybk.forwardButton = my_fwdbttn;
my_FLVPlybk.bufferingBar = my_buffrgbar;
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
water.flv";
See also
FLVPlayback.bufferingBarHidesAndDisablesOthers