Description
Method; seeks to next navigation cue point, based on the current value of the
playheadTime
property. The method skips navigation cue points that have been disabled and goes to the end
of the FLV file if there is no other cue point.
For several reasons, the
property might not have the expected value
playheadTime
immediately after calling one of the seek methods or setting
to cause seeking.
playheadTime
First, for a progressive download, you can seek only to a keyframe, so a seek takes you to the
time of the first keyframe after the specified time. (When streaming, a seek always goes to the
precise specified time even if the source FLV file doesn't have a keyframe there.) Second,
seeking is asynchronous, so if you call a seek method or set the
property,
playheadTime
does not update immediately. To obtain the time after the seek is complete,
playheadTime
listen for the
event, which does not start until the
property has updated.
seek
playheadTime
Example
The following example seeks to the next navigation cue point when the cue point named
occurs. This has the effect of skipping that portion of the FLV file between the cue
point2
points named point2 and point3.
Drag an FLVPlayback component to the Stage, and give it an instance name of
my_FLVPlybk. Then add the following code to the Actions panel on Frame 1 of the
Timeline:
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object) {
if(eventObject.info.name == "point2")
my_FLVPlybk.seekToNextNavCuePoint(eventObject.info.time);
}
my_FLVPlybk.addEventListener("cuePoint", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
cuepoints.flv";
See also
,
,
,
FLVPlayback.cuePoint
FLVPlayback.findCuePoint()
FLVPlayback.playheadTime
,
,
FLVPlayback.seekToNavCuePoint()
FLVPlayback.seekToPrevNavCuePoint()
,
FLVPlayback.isFLVCuePointEnabled()
FLVPlayback.setFLVCuePointEnabled()
FLVPlayback class
663
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers