Using embedded cue points with the FLVPlayback
component (Flash Professional only)
You can view cue points for an FLV file in the Property inspector when you use the
FLVPlayback component. After you set the
instance, you can view any cue points that are embedded in the video file. Using the
Parameters tab, find the
of the cue points in the file.
To see the cue points on the Parameters tab, you must type the name of your FLV file in
the contentPath text box instead of using code to assign the contentPath.
The following example shows how to use cue point information with the FLVPlayback
component.
To use cue points with the FLVPlayback component:
1.
Create a new Flash document called cueFlv.fla.
2.
Open the Components panel (Window > Components), and drag an instance of the
FLVPlayback and TextArea components to the Stage.
3.
Select the TextArea component, and type my_ta in the Instance Name text box in the
Property inspector (Window > Properties > Properties).
4.
With the TextArea component still selected, type 200 in the width text box and 100 in the
height text box.
5.
Select the FLVPlayback instance on the Stage, and then type my_flvPb in the Instance
Name text box.
6.
Select Frame 1 on the Timeline, and type the following code in the Actions panel.
var my_flvPb:mx.video.FLVPlayback;
var my_ta:mx.controls.TextArea;
my_flvPb.contentPath = "http://www.helpexamples.com/flash/video/
cuepoints.flv";
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object) {
my_ta.text += "Elapsed time in seconds: " + my_flvPb.playheadTime +
"\n";
};
my_flvPb.addEventListener("cuePoint",listenerObject);
614
Working with Images, Sound, and Video
contentPath
property, and click the magnifying glass icon to see a list
cuePoints
property for the FLVPlayback
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?