EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 619

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.

Table of Contents

Related product manuals