NetStream
975
The
onCuePoint()
event handler receives an object with these properties:
You can define cue points in an FLV file when you first encode the file, or when you import a
video clip in the Flash Authoring tool by using the Video Import wizard.
The
onMetaData()
event handler also retrieves information about the cue points in a video
file. However the
onMetaData()
event handler gets information about all of the cue points
before the video begins playing. The
onCuePoint()
event handler receives information about
a single cue point at the time specified for that cue point during playback.
Generally if you want your code to respond to a specific cue point at the time it occurs you
should use the
onCuePoint()
event handler to trigger some action in your code.
You can use the list of cue points provided to the
onMetaData()
event handler to let your user
start playing the video at predefined points along the video stream. Pass the value of the cue
point's
time
property to the
NetStream.seek()
method to play the video from that cue
point.
Availability:
ActionScript 1.0; Flash Player 8
Parameters
infoObject
:Object
- An object containing the
name
,
time
,
type
, and
parameters
for the
cue point.
Example
The code in this example starts by creating new NetConnection and NetStream objects. Then
it defines the
onCuePoint()
handler for the NetStream object. The handler cycles through
each named property in the
infoObject
object and prints the property's name and value.
When it finds the property named
parameters
it cycles through each parameter name in the
list and prints the parameter name and value.
var nc:NetConnection = new NetConnection();
nc.connect(null);
Property
Description
name
The name given to the cue point when it was embedded in the FLV
file.
time
The time in seconds at which the cue point occurred in the video file
during playback.
type
The type of cue point that was reached, either "navigation" or
"event".
parameters
A associative array of name/value pair strings specified for this cue
point. Any valid string can be used for the parameter name or value.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...