User Guide
530 FLVPlayback Component (Flash Professional Only)
The progress or fullness movie clip is scaled horizontally based on the percentage. At 0%, the
instance’s
_xscale is set to 0, making it invisible. As the percentage grows, the _xscale is
adjusted until, at 100%, the clip is the same size it was on the Stage when it was created.
Again, this is not necessarily
_xscale = 100 because the clip instance might have been scaled
when it was created.
Connecting your FLV Playback Custom UI components
You must write ActionScript code to connect your FLV Playback Custom UI components to
your instance of the FLVPlayback component. First, you must assign a name to the
FLVPlayback instance and then use ActionScript to assign your FLV Playback Custom UI
component instances to the corresponding FLVPlayback properties. In the following example,
the FLVPlayback instance is my_FLVPlybk, the FLVPlayback property names follow the
periods (.), and the FLV Playback Custom UI control instances are to the right of the equal
(=) signs:
//FLVPlayback instance = my_FLVPlybk
my_FLVPlybk.playButton = playbtn; // set playButton property to playbtn,
etc.
my_FLVPlybk.pauseButton = pausebtn;
my_FLVPlybk.playPauseButton = playpausebtn;
my_FLVPlybk.stopButton = stopbtn;
my_FLVPlybk.muteButton = mutebtn;
my_FLVPlybk.backButton = backbtn;
my_FLVPlybk.forwardButton = forbtn;
my_FLVPlybk.volumeBar = volbar;
my_FLVPlybk.seekBar = seekbar;
my_FLVPlybk.bufferingBar = bufbar;
Example
The following steps create custom StopButton, PlayPauseButton, MuteButton, and SeekBar
controls:
1. Drag the FLVPlayback component to the Stage, and give it an instance name of
my_FLVPlybk.
2. Set the contentPath parameter through the Component inspector to http://
www.helpexamples.com/flash/video/cuepoints.flv.
3. Set the Skin parameter to None.
4. Drag a StopButton, a PlayPauseButton, and a MuteButton to the Stage, and place them
over the FLVPlayback instance, stacking them vertically on the left. Give each button an
instance name in the Property inspector (such as my_stopbttn, my_plypausbttn, and
my_mutebttn).