MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 619

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

3.
Select the component and open the Property inspector (Window > Properties >
Properties).
4.
Type my_flvPb in the Instance Name text box.
5.
Drag an instance of the Button component from the Components panel to the Stage.
6.
Select the Button component and type my_button in the Instance Name text box.
7.
Select Frame 1 on the Timeline and type the following code in the Actions panel:
import mx.video.FLVPlayback;
var my_flvPb:FLVPlayback;
my_flvPb.autoPlay = false;
my_flvPb.contentPath = "http://www.helpexamples.com/flash/video/
cuepoints.flv";
my_button.label = "Next cue point";
function clickMe(){
my_flvPb.seekToNextNavCuePoint();
}
my_button.addEventListener("click", clickMe);
8.
Select Control > Test Movie to test your code.
The cuepoints.flv file contains three navigation cue points: one each near the beginning,
middle, and end of the video file. When you click the button, the FLVPlayback instance
seeks to the next cue point until it reaches the last cue point in the video file.
You can also seek to a specified cue point in an FLV file by using the
method, as shown in the following example.
To seek to a specified cue point:
1.
Create a new Flash document called seek2.fla.
2.
Drag an instance of the FLVPlayback component from the Components panel (Window
> Components).
The component is in the FLVPlayback - Player 8 folder.
3.
Select the component, and open the Property inspector (Window > Properties >
Properties).
4.
Type my_flvPb in the Instance Name text box.
5.
With the FLVPlayback instance still selected, click the Parameters tab.
6.
Type http://www.helpexamples.com/flash/video/cuepoints.flv in the contentPath
text box.
seekToCuePoint()
About using FLV video
619

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents