About using FLV video
619
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
seekToCuePoint()
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.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...