620 Working with Images, Sound, and Video
When you type the URL in the contentPath text box, the cue points appear in the
Parameters tab (next to cuePoint parameter). Therefore, you can determine the name of
the cue point that you want to find in your code. If you click the magnifying glass icon,
you can view all of the video file’s cue points and information about each cue point in
a table.
7. Drag an instance of the Button component from the Components panel to the Stage.
8. Select the Button component and type my_button in the Instance Name text box.
9. 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_button.label = "Seek to point2";
function clickMe(){
my_flvPb.seekToNavCuePoint("point2");
}
my_button.addEventListener("click", clickMe);
10.
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 specified cue point (
point2).
For more information on cue points, see “Using cue points” on page 498. For more
information on the FLVPlayback component, see “FLVPlayback Component (Flash
Professional Only)” on page 489.
Working with metadata
You can use the onMetaData method to view the metadata information in your FLV file.
Metadata includes information about your FLV file, such as duration, width, height, and
frame rate. The metadata information that is added to your FLV file depends on the software
you use to encode your FLV file or the software you use to add metadata information.
NOTE
If your video file does not have metadata information, you can use tools to add metadata
information to the file.